96515 Commits

Author SHA1 Message Date
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
Brandon Zylstra
c65a5548a8 Update box.md
"Code" (when used to refer to what we create in Ruby or any other programming language) is an abstract non-count noun, so it cannot be pluralized.  ("Codes" would be used when referring to specific countable things like PIN codes, which is a different use of the word "code".)

This is somewhat confusing because English allows converting count nouns into non-count nouns, and converting non-count nouns into count nouns, and because many words have both forms.

For an example of converting a non-count noun to a count noun, "water" is normally a non-count noun:

> The world is covered with water.

but people who work in restaurants often use the word as a count noun, as a shorthand for "cup of water":

> I need 7 waters on the big table by the window.

For an example of the opposite conversion, "worm" is normally a count noun:

> There are lots of worms in the puddle.

but someone might use it as a non-count noun when talking about non-distinct remains of worms:

> You have worm all over the bottom of your shoe!

So although a given noun can be flexible enough to be used in either way—even when it is unconventional—there is a definite change of meaning when using a word as a count noun or a non-count noun.
2026-01-05 17:11:06 +09:00
Nobuyoshi Nakada
3267460610 Update bindgen 2026-01-05 16:47:14 +09:00
Nobuyoshi Nakada
28b0e5125f [Bug #18433] Remove unneeded declaration
This `rb_cObject` declaration was only for `rb_cData()` that was
removed at 7c738ce5e649b82bdc1305d5c347e81886ee759a.
2026-01-05 16:47:14 +09:00
Hiroshi SHIBATA
d3ecd9d2ab [ruby/rubygems] Lock minitest ~> 5.1
https://github.com/ruby/rubygems/commit/7b9bfb4e18
2026-01-05 07:22:11 +00:00
Hiroshi SHIBATA
b87b6edf2e [ruby/rubygems] Update vendored net-http to 0.9.1
https://github.com/ruby/rubygems/commit/12072e8d23
2026-01-05 07:22:10 +00:00
Hiroshi SHIBATA
8c8561adbc [ruby/rubygems] Update vendored connection_pool to 2.5.5
https://github.com/ruby/rubygems/commit/4c1eb2b274
2026-01-05 07:22:10 +00:00
Hiroshi SHIBATA
05f791bf41 [ruby/rubygems] rake update
https://github.com/ruby/rubygems/commit/aa7632161e
2026-01-05 07:22:09 +00:00
Tsutomu Katsube
99bd18b5b8 Unskip RBS test on Windows for NoMemoryError workaround
test-unit 3.7.7 has been fixed this problem.

See also:
https://github.com/test-unit/test-unit/releases/tag/3.7.7
2026-01-05 13:48:29 +09:00
Shugo Maeda
e6762d23cb
[DOC] Fix a typo and trim trailing whitespace per .editorconfig 2026-01-05 11:49:48 +09:00
Hiroshi SHIBATA
01e8b38f60
Use RUBY_VERSION in specs instead of hardcoded 'Ruby 4.0.0' to make tests version-independent 2026-01-05 11:32:42 +09:00
Jeremy Evans
699813b65f [ruby/rubygems] Remove date require from rebuild command
As far as I can see, this isn't used.

https://github.com/ruby/rubygems/commit/67c97e7180
2026-01-05 00:58:13 +00:00
Peter Zhu
7d5c0247eb Dump fstr and frozen status in rb_raw_obj_info_buitin_type 2026-01-04 12:26:06 -05:00
Benoit Daloze
6eadc01cda Fix condition for UTF-8 default in magic_comment_spec.rb 2026-01-04 18:13:08 +01:00
Benoit Daloze
9888a3e8bd UNIXSocket#recvfrom only returns the path on Linux
* Notably it does not on BSD, macOS and Windows.
2026-01-04 18:10:42 +01:00
Benoit Daloze
2bf9543053 Remove assertion which does not hold
* https://github.com/ruby/ruby/actions/runs/20694508956/job/59407571754
  1)
  UNIXSocket.pair emulates unnamed sockets with a temporary file with a path FAILED
  Expected "C:\\a\\_temp\\102424668889-2384.($)".match? /\\AppData\\Local\\Temp\\\d+-\d+\.\(\$\)\z/
  to be truthy but was false
2026-01-04 16:04:02 +01:00
Benoit Daloze
e79f8974b5 Get better error if UNIXSocket.socketpair spec fails 2026-01-04 15:39:31 +01:00
Benoit Daloze
29e7973e05 Update to ruby/spec@94dbd55 2026-01-04 15:36:02 +01:00
Peter Zhu
6939f03f4c Add field handle_weak_references to TypedData
This commit adds a field handle_weak_references to rb_data_type_struct for
the callback when handling weak references. This avoids TypedData objects
from needing to expose their rb_data_type_struct and weak references function.
2026-01-04 09:02:40 -05:00
Benoit Daloze
1b3382cbab Update to ruby/spec@f54296d 2026-01-04 14:53:24 +01:00
Nobuyoshi Nakada
18672b392b
[DOC] Add base-url to ChangeLog by default
It is used to expand repository references to URL.
2026-01-04 16:01:27 +09:00
Augustin Gottlieb
912cf819b9 [ruby/openssl] Improve Argument Error Message in EC:Group.new
Before, passing the wrong number of arguments (e.g., 2) to
OpenSSL::PKey::EC::Group.new raised a generic "wrong number of
arguments"
error.

This change updates it to show the actual argument count and the
expected
options (1 or 4), making debugging easier for the user.

Example:
ArgumentError: wrong number of arguments (given 2, expected 1 or 4)

I hope it helps!

https://github.com/ruby/openssl/commit/783c99e6c7
2026-01-04 06:56:57 +00:00
Koichi ITO
ca0fece56a [DOC] Tweak an example in language/box.md
Although the example code comments indicate that it returns `false`,
a non-matching result for `=~` is actually `nil`.

```ruby
Foo.foo.blank? #=> false
"foo".blank?   #=> false
```

https://github.com/ruby/ruby/blob/v4.0.0-preview3/doc/language/box.md?plain=1#L115-L122

This PR replaces `=~` with `match?` so that it returns the expected `false`.
Since this makes the result a boolean, it also aligns with the expected behavior of
a predicate method name like `blank?`.
2026-01-04 12:53:42 +09:00
Koichi ITO
d8d41d7441 [DOC] Use Ruby::Box#require_relative in box.md examples
Based on the example, it appears that `foo.rb` and `main.rb` are expected to be in the same directory.
Since Ruby 1.9, the current directory is not included in `$LOAD_PATH` by default.
As a result, running `box.require('foo')` as shown in the sample code raises a `LoadError`:

```console
main.rb:2:in `Ruby::Box#require': cannot load such file -- foo (LoadError)
        from main.rb:2:in `<main>'
```

To avoid this, it seems simplest to show either `box.require('./foo')` or `box.require_relative('foo')`.
In this PR, `box.require('foo')` is replaced with `box.require_relative('foo')` to make the intention of
using a relative path explicit.

This should reduce the chance that users trying Ruby Box will run into an unexpected error.
2026-01-04 12:52:40 +09:00
Peter Zhu
5064af7ed1 [ruby/mmtk] Process obj_free candidates in parallel
Redos commit 544770d which seems to have accidentally been undone in b27d935.
2026-01-04 10:26:54 +09:00
Peter Zhu
a0c483fcfb Also output GC thread backtrace in rb_mmtk_gc_thread_bug 2026-01-03 10:43:24 -05:00
Peter Zhu
5b87294d2f Add rb_gc_print_backtrace 2026-01-03 10:43:24 -05:00
Shannon Skipper
65f9c4a06a Drop memberless Data/Struct#inspect trailing space
Anonymous memberless Structs and Data were returning `#<struct >` and
`#<data >` with a trailing space. Now they return `#<struct>` and
`#<data>` to match attrless class behavior and look a bit more compact.
2026-01-03 18:12:44 +09:00
Scott Myron
b6463d59e7 [ruby/json] Directly write to the output buffer when converting UTF32 to UTF8.
https://github.com/ruby/json/commit/a51317c949
2026-01-03 08:30:20 +00:00
Nobuyoshi Nakada
d7a6ff8224
[Bug #21819] Data objects without members should also be frozen 2026-01-03 15:03:57 +09:00
Nobuyoshi Nakada
a8a989b6f6
Test net-imap with ruby/net-imap#593
Delete test/net/imap/test_data_lite.rb, because the target of this
test file has been deleted by [ruby/net-imap#543].

[ruby/net-imap#543]: https://github.com/ruby/net-imap/pull/593
2026-01-03 13:28:58 +09:00
Peter Zhu
2f4119eaea [ruby/mmtk] Use rb_mmtk_gc_thread_bug for rb_mmtk_call_object_closure
https://github.com/ruby/mmtk/commit/308936296a
2026-01-03 00:02:22 +00:00
Peter Zhu
60d9b10dab [ruby/mmtk] Propagate crash of GC thread to mutator thread
This allows the mutator thread to dump its backtrace when a GC thread crashes.

https://github.com/ruby/mmtk/commit/40ff9ffee7
2026-01-03 00:02:22 +00:00
Jean Boussier
16feb46fa2 Convert Queue and SizedQueue to rb builtin
A large part of `thread_sync.c` was migrated already, might as well
go all the way. It also allow to remove a bunch of Rdoc commands.
2026-01-03 00:07:44 +01:00
Peter Zhu
e7695ba3d9 [ruby/mmtk] Check for T_NONE during marking
https://github.com/ruby/mmtk/commit/c3e338bb25
2026-01-02 20:42:11 +00:00
Peter Zhu
31fb970c18 [ruby/mmtk] Assert target is not pinned during normal tracing
https://github.com/ruby/mmtk/commit/58210c88ed
2026-01-02 17:58:49 +00:00