96800 Commits

Author SHA1 Message Date
Nobuyoshi Nakada
b61e18d76b
Win32: configure without an intermediate makefile
This batch file used `nmake` on the old `command.com` to extract the
parent directory name of this file and to get around the command line
argument length limit.  However, Windows 9X support as a build host
ended over a decade ago, and this file now utilizes the functionality
of `cmd.exe` already.
2026-01-09 11:36:46 +09:00
Peter Zhu
e89db8567c [ruby/mmtk] Assert that objects are not T_NONE in the write barrier
https://github.com/ruby/mmtk/commit/59d27203e2
2026-01-09 01:33:41 +00:00
Peter Zhu
aa7eb97d06 [ruby/mmtk] Add MMTK_ASSERT
https://github.com/ruby/mmtk/commit/e34d5cf32f
2026-01-09 01:33:41 +00:00
Earlopain
b3216bc1e1 Fix Ripper::Lexer::State#[] for to_s
The instance variable is called `to_s`, not `event`.
2026-01-09 09:33:16 +09:00
Stan Lo
50b719115a
Remove ruby-bench excludes (#15828)
These benchmarks should be working fine now.
2026-01-08 23:07:50 +00:00
Peter Zhu
c6f9a4d393 Remove check for rb_obj_gen_fields_p in rb_hash_dup
rb_copy_generic_ivar already checks for it, so we don't need to call
rb_obj_gen_fields_p twice.
2026-01-08 17:33:32 -05:00
Max Bernstein
523857bfcb
ZJIT: Replace GuardShape with LoadField+GuardBitEquals (#15821)
GuardShape is just load+guard, so use the existing HIR instructions for load+guard. Probably makes future analysis slightly easier.
2026-01-08 19:57:55 +00:00
Earlopain
16863f2ec1 [ruby/prism] Decouple ripper translator from ripper library
Ripper exposes Ripper::Lexer:State in its output, which is a bit of a problem. To make this work, I basically copy-pasted the implementation.

I'm unsure if that is acceptable and added a test to make sure that these values never go out of sync.
I don't imagine them changing often, prism maps them 1:1 for its own usage.

This also fixed the shim by accident. `Ripper.lex` went to `Translation::Ripper.lex` when it should have been the original. Removing the need for the original resolves that issue.

https://github.com/ruby/prism/commit/2c0bea076d
2026-01-08 18:35:26 +00:00
Earlopain
fc66de3e6b [ruby/prism] Remove unneeded ripper requires
Ripper is either not used or loaded where it is actually needed

https://github.com/ruby/prism/commit/a73a4fb00c
2026-01-08 18:35:25 +00:00
Earlopain
3bfc86558b [ruby/prism] Move LexRipper into its own file
It has a hard dependency on ripper that can't be removed.
This makes it so that ripper can be loaded only when the class is actually used.

https://github.com/ruby/prism/commit/3b5b4a8a6d
2026-01-08 18:35:25 +00:00
git
dcfbbdc38c Update bundled gems list as of 2026-01-08 2026-01-08 09:48:38 +00:00
Hiroshi SHIBATA
19d3f2da66 Skip collection install test 2026-01-08 18:48:00 +09:00
Hiroshi SHIBATA
eaa9902ca7 Exclude ruby-lsp benchmark because released version of rbs didn't have tsort dependency 2026-01-08 18:48:00 +09:00
Hiroshi SHIBATA
4a988b7f48 Inject tsort path before rdoc 2026-01-08 18:48:00 +09:00
Hiroshi SHIBATA
9c49084a20 Update tsort entries under the doc 2026-01-08 18:48:00 +09:00
Hiroshi SHIBATA
9580c7d07b Migrate tsort as bundled gems 2026-01-08 18:48:00 +09:00
Nobuyoshi Nakada
946b1c1ba1
Move parentheses around macro arguments 2026-01-08 13:41:07 +09:00
Nobuyoshi Nakada
1852ef4377
Fail if the Ruby specified with --with-baseruby is too old
If the baseruby is explicitly specified, fail because the option is
not accepted if it does not meet the requirements.  If the option is
not specified, just display the warning and continue, in the hope that
it is not needed.

Follow up GH-15809
2026-01-08 13:30:47 +09:00
Nobuyoshi Nakada
725e3d0aa7
Fluent and/or is supported by Prism too now 2026-01-08 13:29:23 +09:00
Chris Hasiński
7688628684 Fix incorrect bundled gems warning for hyphenated gem names
When requiring a file like "benchmark/ips", the warning system would
incorrectly warn about the "benchmark" gem not being a default gem,
even when the user has "benchmark-ips" (a separate third-party gem)
in their Gemfile.

The fix checks if a hyphenated version of the require path exists in
the bundle specs before issuing a warning. For example, requiring
"benchmark/ips" now checks for both "benchmark" and "benchmark-ips"
in the Gemfile.

[Bug #21828]
2026-01-08 13:15:29 +09:00
Misaki Shioi
080d66beca
Avoid flaky test failures by retrying on local port conflicts (#15818)
This test obtains an available port number by calling `TCPServer.new`,
then closes it and passes the same port number as `local_port` to `TCPSocket.new`.

However, `TCPSocket.new` could occasionally fail with `Errno::EADDRINUSE`
at the bind(2) step.
I believe this happens when tests are run in parallel and another process
on the same host happens to bind the same port in the short window between
closing the `TCPServer` and calling `TCPSocket.new`.

To address this race condition, the test now retries with a newly selected
available port when such a conflict occurs.
2026-01-08 09:41:42 +09:00
Nozomi Hijikata
950ffa90b7
ZJIT: Add ArrayAset instruction to HIR (#15747)
Inline `Array#[]=` into `ArrayAset`.
2026-01-07 18:24:29 -05:00
Burdette Lamar
3ea6ec8344
[DOC] Harmonize #=~ methods (#15814) 2026-01-07 18:02:22 -05:00
Burdette Lamar
5230f835e8
[DOC] Harmonize #[] methods 2026-01-07 18:01:56 -05:00
Hiroshi SHIBATA
7d49838038 [ruby/rubygems] bin/rubocop -A
https://github.com/ruby/rubygems/commit/e3f418aa11
2026-01-07 08:49:23 +00:00
Takuya Noguchi
3657700c40 [ruby/rubygems] Bundler: validate more options for add sub-command
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

https://github.com/ruby/rubygems/commit/6ca2e28680
2026-01-07 08:49:23 +00:00
neimadTL
8846799686 [ruby/rubygems] Update custom errors with Exception#full_message
The use of `Exception#full_message` makes more sense as it shows
the cause and the backstrace.

https://github.com/ruby/rubygems/commit/62a92c3f5e
2026-01-07 07:44:55 +00:00
eileencodes
e1087c1226 [ruby/rubygems] Fix dependency source bug in bundler
I stumbled across a bundler bug that had me scratching my head for
awhile, because I hadn't experienced it before.

In some cases when changing the source in a gemfile from a
`Source::Gemspec` to either a `Source::Path` or `Source::Git` only the
parent gem will have it's gem replaced and updated and the child
components will retain the original version. This only happens if the gem
version of the `Source::Gemspec` and `Source::Git` are the same. It also
requires another gem to share a dependency with the one being updated.

For example if I have the following gemfile:

```
gem "rails", "~> 8.1.1"
gem "propshaft"
```

Rails has a component called `actionpack` which `propshaft` depends on.

If I change `rails` to point at a git source (or path source), only the
path for `rails` gets updated:

```
gem "rails", github: "rails/rails", branch: "8-1-stable"
gem "propshaft"
```

Because `actionpack` is a dependency of `propshaft`, it will remain in
the rubygems source in the lock file WHILE the other gems are correctly
pointing to the git source.

Gemfile.lock:

```
GIT
  remote: https://github.com/rails/rails.git
  revision: https://github.com/ruby/rubygems/commit/9439f463e0ef
  branch: 8-1-stable
  specs:
    actioncable (8.1.1)
      ...
    actionmailbox (8.1.1)
      ...
    actionmailer (8.1.1)
      ...
    actiontext (8.1.1)
      ...
    activejob (8.1.1)
      ...
    activemodel (8.1.1)
      ...
    activerecord (8.1.1)
      ...
    activestorage (8.1.1)
      ...
    rails (8.1.1)
      ...
    railties (8.1.1)
      ...

GEM
  remote: https://rubygems.org/
  specs:
    action_text-trix (2.1.15)
      railties
    actionpack (8.1.1) <===== incorrectly left in Rubygems source
      ...
```

The gemfile will contain `actionpack` in the rubygems source, but will
be missing in the git source so the path will be incorrect. A bundle
show on Rails will point to the correct place:

```
$ bundle show rails
/Users/eileencodes/.gem/ruby/3.4.4/bundler/gems/rails-9439f463e0ef
```

but a bundle show on actionpack will be incorrect:

```
$ bundle show actionpack
/Users/eileencodes/.gem/ruby/3.4.4/gems/actionpack-8.1.1
```

This bug requires the following to reproduce:

1) A gem like Rails that contains components that are released as their
own standalone gem is added to the gemfile pointing to rubygems
2) A second gem is added that depends on one of the gems in the first
gem (like propshaft does on actionpack)
3) The Rails gem is updated to use a git source, pointing to the same
version that is being used by rubygems (ie 8.1.1)
4) `bundle` will only update the path for Rails component gems if no
other gem depends on it.

This incorrectly leaves Rails (or any gem like it) using two different
codepaths / gem source code.

https://github.com/ruby/rubygems/commit/dff76ba4f6
2026-01-07 07:30:26 +00:00
Jarek Prokop
25c72b0e8e Support customizable rustc_flags for rustc builds.
Add `rustc_flags` option for configure that appends to RUSTC_FLAGS
flags used when compiling with rustc for customizable build flags.
It appends to existing defaults in RUSTC_FLAGS.

Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
2026-01-06 23:55:06 -05:00
Peter Zhu
1abb609d66 [ruby/mmtk] Check that a and b are valid objects in write barrier
https://github.com/ruby/mmtk/commit/350625ebb3
2026-01-07 00:58:14 +00:00
Peter Zhu
08f6b8673a [ruby/mmtk] Set MMTK_DEBUG in C compiler for debug builds
https://github.com/ruby/mmtk/commit/12a3904b04
2026-01-07 00:58:14 +00:00
yui-knk
a024dca391 Remove in_masgn field from struct iseq_compile_data
`in_masgn` has not been used since fb6e3a80009a744a4e0b75660f1ce6da65e20e6c.
2026-01-07 08:26:37 +08:00
Philip Hallstrom
b2ed4cdced [ruby/time] Add changelog URI to time.gemspec
https://github.com/ruby/time/commit/08f896ca0d
2026-01-06 23:05:30 +00:00
Peter Zhu
5c24f4081d Add potential missing GC guard in iseq_data_to_ary
The iseq object might be optimized away by the compiler in iseq_data_to_ary
because we mainly only use the iseq_body. With MMTk, this crash occasionally
happens:

    TestIseqLoad#test_stressful_roundtrip [test/-ext-/iseq_load/test_iseq_load.rb:20]:
    pid 106677 killed by SIGSEGV (signal 11) (core dumped)
    | -:10: [BUG] Segmentation fault at 0x0000000000f1410c
    | ruby 4.1.0dev (2026-01-05T23:31:16Z master 5d26a2aeea) +PRISM +GC[mmtk] [x86_64-linux]
    |
    | -- Control frame information -----------------------------------------------
    | c:0005 p:---- s:0022 e:000021 l:y b:---- CFUNC  :to_a
    | c:0004 p:0039 s:0018 e:000017 l:y b:0001 METHOD -:10
    | c:0003 p:0013 s:0010 e:000009 l:y b:0001 METHOD -:16
    | c:0002 p:0054 s:0006 e:000005 l:n b:---- EVAL   -:26 [FINISH]
    | c:0001 p:0000 s:0003 E:0003a0 l:y b:---- DUMMY  [FINISH]
    |
    | -- Ruby level backtrace information ----------------------------------------
    | -:26:in '<main>'
    | -:16:in 'test_bug8543'
    | -:10:in 'assert_iseq_roundtrip'
    | -:10:in 'to_a'
    |
    | -- Threading information ---------------------------------------------------
    | Total ractor count: 1
    | Ruby thread count for this ractor: 1
    |
    | -- Machine register context ------------------------------------------------
    |  RIP: 0x000055b581f866f5 RBP: 0x0000000000000000 RSP: 0x00007ffccce2ffe0
    |  RAX: 0x00000200ffee2b08 RBX: 0x0000000000f1410c RCX: 0x0000000000000000
    |  RDX: 0x000000000010c7f2 RDI: 0x00000200ffee2b08 RSI: 0x00000200ffee2b08
    |   R8: 0x0000000000000004  R9: 0x00000c0803ffb8ac R10: 0x00007fe9074c0cc8
    |  R11: 0x0000000000000246 R12: 0x0000000000000000 R13: 0x0000000000000001
    |  R14: 0x0000000000000001 R15: 0x00000200ffee2208 EFL: 0x0000000000010246
    |
    | -- C level backtrace information -------------------------------------------
    | ruby(rb_print_backtrace+0x14) [0x55b582119a9f] vm_dump.c:1105
    | ruby(rb_vm_bugreport) vm_dump.c:1450
    | ruby(rb_bug_for_fatal_signal+0x102) [0x55b582409072] error.c:1131
    | ruby(sigsegv+0x46) [0x55b582051bf6] signal.c:948
    | /lib/x86_64-linux-gnu/libc.so.6(0x7fe907645330) [0x7fe907645330]
    | ruby(iseq_data_to_ary+0xe5) [0x55b581f866f5] iseq.c:3380
    | ruby(iseq_data_to_ary+0x6b2) [0x55b581f86cc2] iseq.c:3470
    | ruby(vm_call_cfunc_with_frame_+0x10d) [0x55b5820e4a0d] vm_insnhelper.c:3902
2026-01-06 17:16:38 -05:00
Burdette Lamar
58fb95af36
[DOC] Harmonize #== methods (#15805) 2026-01-06 17:13:15 -05:00
Matt Valentine-House
49ca241d6d Show a more verbose message if BASERUBY is too old 2026-01-06 17:09:27 +00:00
Nobuyoshi Nakada
925d04108b
Add rake target to run the bundled rake 2026-01-06 18:37:41 +09:00
Steve Savio
bff7c6d9e9 [DOC] Fix minor typo on shareable procs section 2026-01-06 18:30:33 +09:00
Schneems
ad6b85450d [ruby/rubygems] Retain current bundler version on bundle clean
Previously: In #9218 a reproduction is shared where running `bundle clean` using a binstub (`bin/bundle`) results in bundler removing itself. This results in Ruby falling back to its default bundler version. This behavior seems to be present for as long as there has been a default version of bundler (Ruby 2.6+).

Now: Bundler will explicitly add its current version number to the specs to be preserved. This prevents `bundle clean` from removing the current bundler version.

close https://github.com/ruby/rubygems/pull/9218

https://github.com/ruby/rubygems/commit/e3f0167ae4
2026-01-06 04:38:13 +00:00
Schneems
4377249bbf [ruby/rubygems] Test for removing current bundler version
https://github.com/ruby/rubygems/commit/675342e6d0
2026-01-06 04:38:13 +00:00
Schneems
16bdfa1b2a [ruby/rubygems] Split logic to two lines
https://github.com/ruby/rubygems/commit/5a6eca4cf9
2026-01-06 04:38:12 +00:00
lolwut
3143543f95 [ruby/rubygems] Compare like values in find_bundler
The input to this method is not guaranteed to be a string, it could be a `Gem::Version` this normalizes the comparison.

https://github.com/ruby/rubygems/commit/1f43c7a988
2026-01-06 04:38:12 +00:00
Hiroshi SHIBATA
1b476606f2
Update the latest versions of actions 2026-01-06 13:07:49 +09:00
dependabot[bot]
95f2c78fc2 Bump dependabot/fetch-metadata from 2.4.0 to 2.5.0
Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 2.4.0 to 2.5.0.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](08eff52bf6...21025c705c)

---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
  dependency-version: 2.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-06 11:42:34 +09:00
Peter Zhu
5d26a2aeea [ruby/mmtk] Assert pinning object is not moved
https://github.com/ruby/mmtk/commit/8813e76bf8
2026-01-05 23:31:16 +00:00
BurdetteLamar
dd67874ad9 [DOC] Harmonize #=== methods 2026-01-05 18:30:40 -05:00
BurdetteLamar
a25f468917 [DOC] Harmonize #>= methods 2026-01-05 18:23:55 -05:00
Takashi Kokubun
7a1180afb6 ruby-bench: Prefer --excludes over rm -rf
to remind us of skipped benchmarks in the CI job names
2026-01-05 13:33:58 -08:00
Max Bernstein
23765a5e09
ZJIT: Update Iongraph (#15806)
Fix some rendering bugs and remove React.
2026-01-05 15:16:48 -05:00
Luke Gruber
7e81bf5c0c
Fix sleep spurious wakeup from sigchld (#15802)
When sleeping with `sleep`, currently the main thread can get woken up from sigchld
from any thread (subprocess exited). The timer thread wakes up the main thread when this
happens, as it checks for signals. The main thread then executes the ruby sigchld handler
if one is registered and is supposed to go back to sleep immediately. This is not ideal but
it's the way it's worked for a while. In commit 8d8159e7d8 I added writes to `th->status`
before and after `wait_running_turn` in `thread_sched_to_waiting_until_wakeup`, which is
called from `sleep`. This is usually the right way to set the thread's status, but `sleep`
is an exception because the writes to `th->status` are done in `sleep_forever`. There's a
loop that checks `th->status` in `sleep_forever`. When the main thread got woken up from
sigchld it saw the changed `th->status` and continued to run the main thread instead of
going back to sleep.

The following script shows the error. It was returning instead of sleeping forever.

```ruby
t = Thread.new do
  sleep 0.3
  `echo hello`  # Spawns subprocess
  puts "Subprocess exited"
end

puts "Main thread sleeping..."
result = sleep  # Should block forever
puts "sleep returned: #{result.inspect}"
```

Fixes [Bug #21812]
2026-01-05 12:18:47 -05:00