| Age | Commit message (Collapse) | Author |
|
Fixes `TestZlibGzipReader#test_gets2`,
`Psych_Unit_Tests#test_spec_explicit_families`, and many failures in
`test_unicode_normalize.rb`.
|
|
Fixes ruby/prism#2321
Co-authored-by: Adrianna Chang <adrianna.chang@shopify.com>
Co-authored-by: Peter Zhu <peter@peterzhu.ca>
|
|
|
|
Previously, `return *array, 1` didn't behave like `return [*array, 1]`
properly. Also, it crashed when splat and kwsplat is combined like in
`array = [*things, **hash]`.
Fix this by grouping `PM_ARGUMENTS_NODE` with `PM_ARRAY_NODE` handling and
combining splat and kwsplat handling.
|
|
anonymous splat
Previously, this would push the provided keywords onto the argument
splat. Add ruby2_keywords to the list of other checks for whether
it is safe for treating a given splat as mutable when the called
method accepts an anonymous splat.
|
|
Fixes ruby/prism#2307.
|
|
Fixes: https://github.com/ruby/prism/issues/2294
|
|
|
|
Fixes ruby/prism#2295.
|
|
Sometimes this file get picked up and break Ripper tests:
TestRipper::Generic#test_parse_files:test/ruby
assert_separately failed with error message
pid 63392 exit 0
| test_regexp.rb:2025: warning: character class has duplicated range
https://github.com/ruby/ruby/actions/runs/7699956651/job/20982702553#step:12:103
|
|
|
|
Fixes ruby/prism#2290.
|
|
|
|
|
|
Fixes ruby/prism#2242.
|
|
Suppose YJIT runs a rb_vm_opt_send_without_block()
fallback and the control frame stack looks like:
```
will_tailcall_bar [FINISH]
caller_that_used_fallback
```
will_tailcall_bar() runs in the interpreter and sets up a tailcall.
Right before JIT_EXEC() in the `send` instruction, the stack will look like:
```
bar [FINISH]
caller_that_used_fallback
```
Previously, JIT_EXEC() ran bar() in JIT code, which caused the `FINISH`
flag to return to the interpreter instead of to the JIT code running
caller_that_used_fallback(), causing code to run twice and probably
crash. Recent flaky failures on CI about "each stub expects a particular
iseq" are probably due to leaving methods twice in
`test_optimizations.rb`.
Only run JIT code from the interpreter if a new frame is pushed.
|
|
Fixes ruby/prism#2272.
|
|
Fix [Bug #20207]
Fix [Bug #20212]
Handling consecutive lookarounds in init_cache_opcodes is buggy, so it
causes invalid memory access reported in [Bug #20207] and [Bug #20212].
This fixes it by using recursive functions to detected lookarounds
nesting correctly.
|
|
|
|
|
|
|
|
Fixes ruby/prism#2250.
Co-Authored-By: Kevin Newton <kddnewton@gmail.com>
|
|
Fixes ruby/prism#2279.
|
|
For zsuper calls with a keyword splat but no actual keywords, the
keyword splat is passed directly, so it cannot be mutable, because
if the callee accepts a keyword splat, changes to the keyword splat
by the callee would be reflected in the caller.
While here, simplify the logic when the method supports
literal keywords. I don't think it is possible for
a method with has_kw param flags to not have keywords, so add an
assertion for that, and set VM_CALL_KW_SPLAT_MUT in a single place.
|
|
|
|
|
|
|
|
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
|
|
In my windows environment uses cp932 for terminal encoding.
|
|
This allows ... argument forwarding to benefit from Allocationless
Anonymous Splat Forwarding, allowing the `f` call below to not
allocate an array or a hash.
```ruby
a = [1]
kw = {b: 2}
def c(a, b:)
end
def f(...)
c(...)
end
f(*a, **kw)
```
This temporarily skips prism locals tests until prism is changed
to use * and ** for ..., instead of using ruby2_keywords.
Ignore failures in rbs bundled gems tests, since they fail due
to this change.
|
|
|
|
|
|
Fixes ruby/prism#2248.
|
|
Co-Authored-By: Matt Valentine-House <matt@eightbitraptor.com>
|
|
Co-Authored-By: Matt Valentine-House <matt@eightbitraptor.com>
|
|
Co-Authored-By: Matt Valentine-House <matt@eightbitraptor.com>
|
|
Co-Authored-By: Matt Valentine-House <matt@eightbitraptor.com>
|
|
We need to make sure there is enough room in the local table for
repeated `*_` parameters
Co-Authored-By: Matt Valentine-House <matt@eightbitraptor.com>
|
|
Ensure there is enough space in the local table for repeated optional
parameters.
Co-Authored-By: Matt Valentine-House <matt@eightbitraptor.com>
|
|
Co-Authored-By: Matt Valentine-House <matt@eightbitraptor.com>
|
|
Fixes ruby/prism#2253.
|
|
Fixes ruby/prism#2262.
|
|
It seems to work with RUBY_ISEQ_DUMP_DEBUG=to_binary so we can try this
test again on CI.
|
|
Prism provides an index (local_body_index) which is supposed to point at
the start of locals declared in the method body. Prism assumed that
method body locals would only occur _after_ parameter names.
Unfortunately this assumption is not correct, which meant that we would
in some cases not insert all locals in the local table. This commit
iterates over locals a second time, inserting any that didn't get
inserted on the first pass.
Fixes: https://github.com/ruby/prism/issues/2245
Co-Authored-By: Matt Valentine-House <matt@eightbitraptor.com>
|
|
Fixes ruby/prism#2256.
|
|
Fixes ruby/prism#2247.
|
|
Fixes ruby/prism#2257.
|
|
|
|
Fixes ruby/prism#2249.
|
|
|