[pull] master from ruby:master - #1446
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 : )