Skip to content

[pull] master from ruby:master - #1455

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

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

Conversation

@pull

@pull pull Bot commented Sep 28, 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 11 commits September 28, 2026 14:05
In 7eab8b5 I wanted to avoid extra
work. Since we don't actually use any profile information in ZJIT for
compiling `opt_case_dispatch`, I decided not to call the profiling
instruction.

However, this caused a regression in `mail` and `rubocop`: this call to
the profiler is also our hook to the function lifecycle code, which
triggers a rewrite from the ZJIT version of the instruction back to the
normal bare opcode. My commit stopped rewriting back to the original
opcode when the ZJIT machinery should have.

Because in the interpreter the bare opcode path is much faster for
integer-only case/when dispatch, this regressed `mail` and `rubocop`.

We'll have to figure out why we are spending a lot of time in
interpreter case/when dispatch for those benchmarks (code size?), but
for now this fixes the regression.
Raise `Ractor::ClosedError` to prevent child threads from accessing
freed port tables during teardown.
Avoid reading before the buffer when the resolved base path is empty.
Allocate only the buffer needed by the selected home directory source.
Keep the cleanup path and reject temporary paths that cannot fit.
Set seconds and nanoseconds together to avoid duplicate conversions.
Make hidden shape copy of an array.
When a variable is captured anywhere in a pattern, the operands of each
alternation are visited to report captures inside them. That visitor
treated every local variable target as a capture, including
underscore-prefixed names and targets that belong to a lambda, a string
interpolation, or a pinned expression:

    case foo
    in [bar, 1 | _baz]                         # error
    in [bar, "#{case 1; in baz; end}" | 2]     # error
    end

Without `bar` both are accepted. Skip underscore-prefixed names, like
parse_pattern_capture does, and only descend into the nodes that make up
the pattern itself. Nested alternations are skipped too, their operands
were already checked when they were parsed. Before this, a capture like
`1 => [x, (1 | y) | 2]` was reported twice.

The new fixture is excluded from the tests that compare against parse.y,
which currently rejects these forms because of the capture of `bar`:
https://bugs.ruby-lang.org/issues/22310

ruby/prism@33ef692741
It's assignable from Ruby simply for the gem's own initialization,
but it should never be re-assigned later.

Fix: ruby/json#1079

ruby/json@cc32ef5cf5
@pull pull Bot locked and limited conversation to collaborators Sep 28, 2026
@pull pull Bot added the ⤵️ pull label Sep 28, 2026
@pull
pull Bot merged commit 5fe7d61 into turkdevops:master Sep 28, 2026
0 of 2 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