diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2024-01-23 14:43:53 -0500 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2024-01-23 15:23:13 -0500 |
| commit | cecf42601aa4170aa2336dbb3ffc7753e86e6115 (patch) | |
| tree | 11a14a3e34a9a8589ab3a2147e7a83706cb8cf25 /test/ruby | |
| parent | 333f4b4930bf397f87bd99767b53fcce4f9a3e43 (diff) | |
[PRISM] Fix block fowarding
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_compile_prism.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb index 66fbefd27b..8357914ce2 100644 --- a/test/ruby/test_compile_prism.rb +++ b/test/ruby/test_compile_prism.rb @@ -1690,6 +1690,15 @@ end def test_BlockArgumentNode assert_prism_eval("1.then(&:to_s)") + + # Test forwarding with no name + assert_prism_eval(<<~RUBY) + o = Object.new + def o.foo(&) = yield + def o.bar(&) = foo(&) + + o.bar { :ok } + RUBY end def test_BlockLocalVariableNode |
