85071 Commits

Author SHA1 Message Date
Hiroshi SHIBATA
a95b46db06 [rubygems/rubygems] Track HEAD changes for old PR proposal
https://github.com/rubygems/rubygems/commit/e3d180620c
2024-04-19 05:18:21 +00:00
Hiroshi SHIBATA
0a14fee02f [rubygems/rubygems] Removed redundant begin
https://github.com/rubygems/rubygems/commit/a9d22e5f46
2024-04-19 05:18:20 +00:00
fatkodima
09cbbe0e3d [rubygems/rubygems] Add plugin hooks for Bundler.require
https://github.com/rubygems/rubygems/commit/b373b7ed0d
2024-04-19 05:18:20 +00:00
Nobuyoshi Nakada
1984db2db8
Preserve old encinit.c if unchanged 2024-04-19 14:12:42 +09:00
Nobuyoshi Nakada
05d681f91e
Make Output.new accepts keyword arguments 2024-04-19 14:12:42 +09:00
Nobuyoshi Nakada
801e4a4feb
Remove UPDATE_LIBRARIES
It has not been used since e48375c112022fa321786ccd95dd4e718efd78a3.
2024-04-19 14:12:42 +09:00
Nobuyoshi Nakada
3169c15863
Fix rubyspec-capiext dependency
Not to build the rubyspec-capiext extension libraries again on the
next build after the build all extensions get built, ensure these
extensions are up to date when recursively building from exts.mk.
2024-04-19 14:12:41 +09:00
Nobuyoshi Nakada
7f87ad9fc4
Refer autoconfigured endian macro (#10572)
Remove the case `RB_IO_BUFFER_HOST_ENDIAN` is not defined.
2024-04-19 15:58:53 +12:00
ilyazub
b7c4c8869c
Update turbo_tests to 2.2.3 or higher
commands/pristine_spec.rb is passed with the turbo_tests 2.2.3 because it the removed json dependency.

Related to https://github.com/ruby/ruby/pull/10496
Related to d60b2caa95b01f37d35db9ef8be1d035d14b408d
2024-04-19 08:32:01 +09:00
eileencodes
6443d690ae Don't mark empty singleton cc's
These cc's aren't managed by the garbage collector so we shouldn't try
to mark and move them.
2024-04-18 14:21:01 -07:00
Aaron Patterson
64d0817ea9 Remove markable guard before pushing on ccs list
CCS list doesn't mark CI objects, so it doesn't matter whether or not
they are markable before pushing.
2024-04-18 14:11:25 -07:00
Peter Zhu
ea7975c59b Include coderange.h in encoding.h
ruby_coderange_type is defined in ruby/internal/encoding/coderange.h so
we need to include it.
2024-04-18 14:50:20 -04:00
git
2f8128986a Update default gems list at a51139230bfbd509b300fafc48e9a1 [ci skip] 2024-04-18 18:37:53 +00:00
Kevin Newton
a51139230b [ruby/prism] Bump to v0.26.0
https://github.com/ruby/prism/commit/eadb09ef36
2024-04-18 18:36:57 +00:00
Kevin Newton
8f908a354e [ruby/prism] "Fix" transpose issue in parser compiler
https://github.com/ruby/prism/commit/593d637178
2024-04-18 18:34:42 +00:00
Aaron Patterson
147ca9585e Implement equality for CI comparison when CC searching
When we're searching for CCs, compare the argc and flags for CI rather
than comparing pointers.  This means we don't need to store a reference
to the CI, and it also naturally "de-duplicates" CC objects.

We can observe the effect with the following code:

```ruby
require "objspace"

hash = {}

p ObjectSpace.memsize_of(Hash)

eval ("a".."zzz").map { |key|
  "hash.merge(:#{key} => 1)"
}.join("; ")

p ObjectSpace.memsize_of(Hash)
```

On master:

```
$ ruby -v test.rb
ruby 3.4.0dev (2024-04-15T16:21:41Z master d019b3baec) [arm64-darwin23]
test.rb:3: warning: assigned but unused variable - hash
3424
527736
```

On this branch:

```
$ make runruby
compiling vm.c
linking miniruby
builtin_binary.inc updated
compiling builtin.c
linking static-library libruby.3.4-static.a
ln -sf ../../rbconfig.rb .ext/arm64-darwin23/rbconfig.rb
linking ruby
ld: warning: ignoring duplicate libraries: '-ldl', '-lobjc', '-lpthread'
RUBY_ON_BUG='gdb -x ./.gdbinit -p' ./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems  ./test.rb
2240
2368
```

Co-authored-by: John Hawthorn <jhawthorn@github.com>
2024-04-18 09:06:33 -07:00
careworry
8e08556fa7
chore: remove repetitive words (#10573)
Signed-off-by: careworry <worrycare@outlook.com>
2024-04-18 15:32:34 +00:00
tomoya ishida
ff599aea7c [ruby/irb] Fix % escape in prompt format
(https://github.com/ruby/irb/pull/927)

https://github.com/ruby/irb/commit/08eee25d28
2024-04-18 14:46:55 +00:00
Peter Zhu
81240493a3 Remove unused rb_size_pool_slot_size 2024-04-18 10:19:42 -04:00
Alan Wu
28efc0c924
YJIT: Fix canary crash with Array#<< (#10568)
Previously, we got "We are killing the stack canary set by opt_ltlt"
from `$./miniruby --yjit-call-threshold=1 -e 'a = [].freeze; a << 1'`

Found by running ruby-spec with yjit-call-threshold=1.
2024-04-18 10:04:23 -04:00
tomoya ishida
57a262e325 [ruby/irb] Accept " " for colorizing "\t" test
(https://github.com/ruby/irb/pull/924)

https://github.com/ruby/irb/commit/c8182fa490
2024-04-18 11:48:13 +00:00
Lorenzo Zabot
2e978c2cb3 [ruby/irb] Prompt specifiers documentation improvements
(https://github.com/ruby/irb/pull/926)

https://github.com/ruby/irb/commit/e8ea8f253d
2024-04-18 10:33:23 +00:00
Jean Boussier
3a7846b1aa Add a hint of ASCII-8BIT being BINARY
[Feature #18576]

Since outright renaming `ASCII-8BIT` is deemed to backward incompatible,
the next best thing would be to only change its `#inspect`, particularly
in exception messages.
2024-04-18 10:17:26 +02:00
dependabot[bot]
b3c59370ca Bump github/codeql-action from 3.25.0 to 3.25.1
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.0 to 3.25.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](df5a14dc28...c7f9125735)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-17 20:46:51 -07:00
Nobuyoshi Nakada
a80f646616
Explicily lock turbo_tests to 2.2.0 in Gemfile
Ruby-core CI is having issues with turbo_tests 2.2.1. This version adds
json as a dependency and the `bundle install` command ruby-core uses is
not able to compile it for some reason.

I was not able to reproduce the issue locally, so this needs more
investigation.

We're already locked to 2.2.0, but ruby-core does not use a
`Gemfile.lock` so we need to lock explicitly in the Gemfile for now.
2024-04-18 11:07:09 +09:00
David Rodriguez
bc652d7568
[rubygems/rubygems] Never write credentials to lockfiles
https://github.com/rubygems/rubygems/commit/e8a363713e
2024-04-18 11:07:09 +09:00
Kenichi Kamiya
a3b7a7bc21
[ruby/reline] Remove unused variable
(https://github.com/ruby/reline/pull/684)

https://github.com/ruby/reline/commit/ce30c23730
2024-04-18 11:07:09 +09:00
Nobuyoshi Nakada
0f1ef19fcd
[ruby/optparse] Fix typo [ci skip]
https://github.com/ruby/optparse/commit/0aec9adfc5
2024-04-18 10:27:19 +09:00
Nobuyoshi Nakada
88a88b56c7
[ruby/optparse] [DOC] Package files for RDoc
https://github.com/ruby/optparse/commit/b49cb996af
2024-04-18 10:27:19 +09:00
Ben Fritsch
6ac8f6a10e
[ruby/ipaddr] Add IPAddr.cidr to return ip address in cidr notation
https://github.com/ruby/ipaddr/commit/f5b006741f
2024-04-18 10:27:19 +09:00
Takashi Kokubun
07771c7657 Try increasing timeout-minutes for YJIT Ubuntu 2024-04-17 17:54:09 -07:00
Hiroshi SHIBATA
ac62c7379d
gitignore lib/prism/reflection.rb 2024-04-18 09:41:32 +09:00
Kazuhiro NISHIYAMA
9e0c6311e1
Update refs [ci skip] 2024-04-18 08:10:34 +09:00
Kazuhiro NISHIYAMA
41456eb005
Support Misc tracker [ci skip] 2024-04-18 08:10:23 +09:00
Matt Valentine-House
0727d32b56 Don't verify during gc_enter when gc is disabled.
RGENGC_CHECK_MODE >=3 fails with an incinsistency in the old object
count during ec_finalization.

This is due to inconsistency introduced to the object graph using T_DATA
finalizers.

This is explained in commit 79df14c04b452411b9d17e26a398e491bca1a811,
which disabled gc during finalization to work around this.

```
    /* prohibit GC because force T_DATA finalizers can break an object graph consistency */
    dont_gc_on()
```

This object graph inconsistency also seems to break RGENGC_CHECK_MODE >=
3, when it attempt to verify the object age relationships during
finalization at VM shutdown (gc_enter is called during finalization).

This commit stops the internal consistency check during gc_enter only
when RGENGC_CHECK_MODE >= 3 and when gc is disabled.

This fixes `make btest` with `-DRGENGC_CHECK_MODE=3`
2024-04-17 23:29:23 +01:00
Alan Wu
8b81301536
YJIT: A64: Use CBZ/CBNZ to check for zero
* YJIT: A64: Add CBZ and CBNZ encoding functions

* YJIT: A64: Use CBZ/CBNZ to check for zero

Instead of emitting `cmp x0, #0` plus `b.z #target`, A64 offers Compare
and Branch on Zero for us to just do `cbz x0, #target`. This commit
utilizes that and the related CBNZ instruction when appropriate.

We check for zero most commonly in interrupt checks:

```diff
  # Insn: 0003 leave (stack_size: 1)
  # RUBY_VM_CHECK_INTS(ec)
  ldur w11, [x20, #0x20]
  -tst w11, w11
  -b.ne #0x109002164
  +cbnz w11, #0x1049021d0
```

* fix copy paste error

Co-authored-by: Randy Stauner <randy@r4s6.net>

---------

Co-authored-by: Randy Stauner <randy@r4s6.net>
2024-04-17 21:48:38 +00:00
ParadoxV5
48846d6b8d add #2709’s new RBIs to .gemspec 2024-04-17 20:45:25 +00:00
Matt Valentine-House
3a4035a790 Reduce the number of references to need_major_gc 2024-04-17 21:16:47 +01:00
Takashi Kokubun
4cc58ea0b8
YJIT: Optimize local variables when EP == BP (#10487) 2024-04-17 15:00:03 -04:00
tomoya ishida
ca764062b0 [ruby/irb] Remove internal-only methods from Command::Base
(https://github.com/ruby/irb/pull/922)

* Remove internal-only methods from Command::Base

Command#ruby_args and Command#unwrap_string_literal are used for default command's argument backward compatibility.
Moved these methods to another module to avoid being used from custom commands.

* Update lib/irb/command/edit.rb

---------

https://github.com/ruby/irb/commit/7405a841e8

Co-authored-by: Stan Lo <stan001212@gmail.com>
2024-04-17 18:36:30 +00:00
Mike Dalessio
98c84ef42c [rubygems/rubygems] Excluding local platform from lockfile should not affect musl vs gnu case
This case is for not locking things like `arm-darwin-23` when the
lockfile already includes `arm-darwin`, so that we don't infinitely keep
redundant versioned platforms in the lockfile when not necessary.

We detect this with `Gem::Platform#===`. For example,
`Gem::Platform.new("arm-darwin-23") === Gem::Platform.new("arm-darwin")`
but they're not `==`.

However, in the case of `-musl` vs `-gnu`, those act as the platform
"version", but `===` is not commutative for them. This is explained in
`===` docs.

We only want to exclude the local platform in situations when
`Gem::Platform#===` is actually commutative.

https://github.com/rubygems/rubygems/commit/8099c4face
2024-04-17 18:17:12 +00:00
Peter Zhu
814dedcee2 Remove unused ruby_sighandler_t 2024-04-17 14:01:59 -04:00
Kevin Newton
51485e63fc [PRISM] Generate the reflection file 2024-04-17 13:54:29 -04:00
Kevin Newton
d186eb36a4 [ruby/prism] Add a reflection API for determining the fields of a node
https://github.com/ruby/prism/commit/f3f9950a74
2024-04-17 13:54:29 -04:00
Peter Zhu
ee6e591b6a Use unsigned long long for object ID
Since unsigned long long are minumum 64 bits, we have at least 10**17
object IDs available, so there is no chance it will overflow.
2024-04-17 13:33:17 -04:00
tomoya ishida
15b659ca93 [ruby/reline] Refactor nomultiline and multiline mode difference
(https://github.com/ruby/reline/pull/653)

* Support multiline input in Reline.readline internally, reduce multiline-singleline branch

* Add readline(singleline) prompt test with force inserting multiline text

https://github.com/ruby/reline/commit/97846095d7
2024-04-17 16:12:20 +00:00
Kevin Newton
8c8068c06f [PRISM] Remove old make targets for state stack 2024-04-17 10:36:52 -04:00
Kevin Newton
f72436f835 [ruby/prism] Inline pm_state_stack 2024-04-17 10:36:52 -04:00
Peter Zhu
209e2f277e Don't allow T_NIL in gc_is_moveable_obj
gc_is_moveable_obj is only given GC managed objects, and T_NIL cannot be
a GC managed type.
2024-04-17 09:49:11 -04:00
Matt Valentine-House
2470565993 Inline single use variables 2024-04-17 13:31:45 +01:00