diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2024-01-24 13:43:26 -0500 |
|---|---|---|
| committer | Kevin Newton <kddnewton@gmail.com> | 2024-01-24 14:18:25 -0500 |
| commit | 020fe6e0ca3b7f3b0b35466e7086e809f2ccbcd0 (patch) | |
| tree | 07d1e3dfb0487f0a91e66ec1847a5d6599cda470 /test/ruby | |
| parent | dc8fb7d97ff0113c738bded825a37b3196eeaaae (diff) | |
[PRISM] Fix forwarding from within block
Fixes ruby/prism#2253.
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_compile_prism.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb index b7aa75a5b0..5ed41569f5 100644 --- a/test/ruby/test_compile_prism.rb +++ b/test/ruby/test_compile_prism.rb @@ -2033,6 +2033,14 @@ end prism_test_forwarding_arguments_node(1,2, 3, ...) end CODE + + assert_prism_eval(<<~RUBY) + o = Object.new + def o.bar(a, b, c) = [a, b, c] + def o.foo(...) = 1.times { bar(...) } + + o.foo(1, 2, 3) + RUBY end def test_ForwardingSuperNode |
