From cecf42601aa4170aa2336dbb3ffc7753e86e6115 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Tue, 23 Jan 2024 14:43:53 -0500 Subject: [PRISM] Fix block fowarding --- test/ruby/test_compile_prism.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/ruby') 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 -- cgit v1.2.3