[pull] master from ruby:master - #1455
Merged
Merged
Conversation
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
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 : )