diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2024-01-23 12:11:14 -0500 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2024-01-23 15:23:13 -0500 |
| commit | 333f4b4930bf397f87bd99767b53fcce4f9a3e43 (patch) | |
| tree | c444fd8229b15cbc052f5e2686f2da269aa08ffe /test/ruby | |
| parent | c84237f9531aed3b204d3fdacc2dd9d2bd4c7d81 (diff) | |
[PRISM] Support block parameters with no name
Fixes ruby/prism#2249.
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_compile_prism.rb | 4 |
1 files changed, 4 insertions, 0 deletions
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 |
