From 333f4b4930bf397f87bd99767b53fcce4f9a3e43 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Tue, 23 Jan 2024 12:11:14 -0500 Subject: [PRISM] Support block parameters with no name Fixes ruby/prism#2249. --- test/ruby/test_compile_prism.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb index 10def69ff2..66fbefd27b 100644 --- a/test/ruby/test_compile_prism.rb +++ b/test/ruby/test_compile_prism.rb @@ -2055,6 +2055,10 @@ end def test_BlockParameterNode assert_prism_eval("def prism_test_block_parameter_node(&bar) end") assert_prism_eval("->(b, c=1, *d, e, &f){}") + + # Test BlockParameterNode with no name + assert_prism_eval("->(&){}") + assert_prism_eval("def prism_test_block_parameter_node(&); end") end def test_BlockParametersNode -- cgit v1.2.3