diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/ruby/test_compile_prism.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb index bcbd5449e0..b7aa75a5b0 100644 --- a/test/ruby/test_compile_prism.rb +++ b/test/ruby/test_compile_prism.rb @@ -1725,7 +1725,7 @@ end def test_BlockArgumentNode assert_prism_eval("1.then(&:to_s)") - # Test forwarding with no name + # Test anonymous block forwarding assert_prism_eval(<<~RUBY) o = Object.new def o.foo(&) = yield @@ -1733,6 +1733,15 @@ end o.bar { :ok } RUBY + + # Test anonymous block forwarding from argument forwarding + assert_prism_eval(<<~RUBY) + o = Object.new + def o.foo = yield + def o.bar(...) = foo(&) + + o.bar { :ok } + RUBY end def test_BlockLocalVariableNode |
