Skip to content

[pull] master from ruby:master - #1446

Merged
pull[bot] merged 6 commits into
turkdevops:masterfrom
ruby:master
Sep 26, 2026
Merged

pull[bot] merged 6 commits into
turkdevops:masterfrom
ruby:master

Conversation

@pull

@pull pull Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

luke-gruber and others added 6 commits September 25, 2026 14:53
This code should not raise an error:
```
@var = Class.new.freeze.dup # unfrozen copy
@var.instance_variable_set(:@test, 123)
```

It was raising `Ractor::IsolationError` because of a bug in `rb_fields_tbl_copy`.

This patch also fixes the following assertion failure in debug mode:

```
Module.new.freeze.singleton_class.instance_variable_set("@A", 1)
```

Now we get the proper behavior:

```
can't modify frozen Class: #<Class:#<Module:0x00000001094d9900>> (FrozenError)
```

Fixes [Bug #22378]
    $~ = m = /a/.match("a").dup
    /b/ =~ "b"
    p m

[Bug #22381]
This option defaults to `true` like all other `GC.start` options. It only has
effect for the default GC and when there are multiple running Ractors. If
there's only a single running Ractor, the option is ignored.

A global GC runs a stop-the-world full collection of all objects in all Ractors
and can collect shareable objects. When `global: false` is given, it will run a
ractor-local GC if there is more than 1 running Ractor.

Also add `GC.stat(:global_gc_count)`. This is a useful stat and is necessary to be
able to test this change.

This doesn't change the behavior of `GC.start` without arguments either in a Ractor
or on the main Ractor. `GC.start` with multiple Ractors would run a global GC before
as well unless `full_mark: false` was given.

A NEWS.md entry was added for this new `GC.start` keyword argument.

NOTE: most of this commit was accidentally introduced in
60c206b, but the NEWS.md changes were missing.
GCC 15 in C23 mode reads `ANYARGS` as `(void)`, so the bare function pointers are rejected against Ruby headers that do not add the cast themselves, as happened with Ruby 3.1 on Windows.

ruby/resolv#92

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`Win32::Resolve` is never defined, so these tests were not run anywhere.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Caller splats with multiple profiled lengths currently fall back to
dynamic sends, even when each length could use SendDirect.

For opt_send_without_block, dispatch on profiled splat lengths within
each ISEQ receiver arm and specialize argument setup for each length.
Route unmatched lengths and receivers to a shared dynamic Send.

Ideally, we could remove duplicated ArrayLength HIR in the CFG,
but this is left for a follow-up.

Explain that monomorphic profiles use guarded specialization, while
length dispatch handles polymorphic and skewed-polymorphic profiles.
@pull pull Bot locked and limited conversation to collaborators Sep 26, 2026
@pull pull Bot added the ⤵️ pull label Sep 26, 2026
@pull
pull Bot merged commit c41b67d into turkdevops:master Sep 26, 2026
1 of 3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants