Skip to content

[pull] master from ruby:master#1118

Merged
pull[bot] merged 14 commits into
turkdevops:masterfrom
ruby:master
Jun 16, 2026
Merged

[pull] master from ruby:master#1118
pull[bot] merged 14 commits into
turkdevops:masterfrom
ruby:master

Conversation

@pull

@pull pull Bot commented Jun 16, 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 : )

tekknolagi and others added 14 commits June 15, 2026 20:05
We side-exit when HIR uses not-yet-implemented backend features like CCall with >6 args. This ends the current block but does not prevent dominated blocks from being compiled. This could cause a dominated block to reference a (now dead) SSA value produced via or after the side-exit point. Even though the dominated block will never get executed in JIT code, it would crash on compile because `get_opnd` checks that the SSA value has been populated. 

Don't emit C calls from HIR that the LIR backend cannot handle. Emitting calls to C functions with more than 6 arguments (i.e. arguments passed on the stack) is still a TODO.
Co-authored-by: Alan Wu <alanwu@ruby-lang.org>
As you may know, `as` casts can be dangerous since they may be lossy, and
with type inference, it's hard to tell what kind of conversion is
happening.

This commit removes the safe `as i32` casts from members of
`jit_bindgen_constants` enum. This builds, so we know all the constants
fit in i32, with this, they match what `Assembler` expects without
the need to cast.
Previously, we unconditionally passed to the callee
`GET_LEP(calling_frame)[VM_ENV_DATA_INDEX_SPECVAL]`, which in case the
block containing super() is in e.g. a `class`, did not resolve to a
block handler at all.

Properly locate the block handler using logic used in
Kernel#block_given? and defined?(yield). Rename BlockHandler::LEPSpecVal
to FindFromCurrentFrame to reflect this change, as the block handler is
not always in LEP.

[Bug #22116]
This fixes two issues:

If a lockfile has a platform variant only bundler will install the
ruby variant but then fail at setup time because it only looks for the
platform version.

The solution to that is to keep ruby platform variants in the lockfile
even if ruby is not (or cannot) be added to the PLATFORMS.

Now you will get an error if you need the ruby variant but it isn't in
the lockfile, and you can actually resolve the issue by putting the
ruby variant in the lockfile!

ruby/rubygems@564bb9e517
In the call branch of `curry`, `passed` is the only reference keeping the
freshly built argument array alive, yet its backing buffer is handed to
`rb_proc_call_with_block` as `argv` via `RARRAY_CONST_PTR(passed)`. After
taking that pointer `passed` is otherwise unused, so the compiler may drop
it before the call returns. Conservative stack marking then fails to find
the array, and a GC triggered during the call (e.g. under GC.stress) can
reclaim it while `argv` still points into its (embedded) buffer, crashing
with:

  [BUG] try to mark T_NONE object (... parent: T_ARRAY ...)

It also shows up as silent argument corruption, e.g. a curried proc raising
"false can't be coerced into Integer", which is how it surfaced as a flaky
Proc#curry spec failure in CI.

Add RB_GC_GUARD(passed) to keep the array live until the call returns. Note
that `curry` calls with kw_splat == 0, so the argv-rewriting path in
invoke_block_from_c_proc (the rb_proc_call_kw / bd16973 case) is not
reached here; this is purely a liveness issue, not a write-barrier one.

The added test reproduces the crash deterministically under GC.stress.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The name resolution that was inlined at the top of warning? mixed the
cheap SINCE pre-filter with the costly policy checks, making it hard to
test in isolation. Split it into a side-effect-free find_gem returning
the normalized feature, gem name, and subfeature flag, and add direct
unit tests for it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
force_activate has nothing to do with detecting or warning about bundled
gems; it activates an undeclared bundled gem for binding.irb and
bundle console. Delimit it with a section comment so the file's two
responsibilities are no longer visually intertwined.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The caller-frame walking, the bootsnap prefix stripping, and the
thread-local suppression list were all added as point fixes whose
rationale lived only in the commit history. Record why uplevel matches
both "replace_require" and "require" base_labels (the former is the
define_method block), why build_message skips exactly three frames and
how that count is coupled to the call depth, and that prelude.rb drives
the suppression list for binding.irb. Name the require base_labels as
REQUIRE_LABELS while here.

[Bug #20450]
[Bug #21723]

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The section-divider comment rendered as verbatim text. Write it as a plain
RDoc method comment so it reads as documentation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pull pull Bot locked and limited conversation to collaborators Jun 16, 2026
@pull pull Bot added the ⤵️ pull label Jun 16, 2026
@pull pull Bot merged commit 7cdf116 into turkdevops:master Jun 16, 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.

7 participants