diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2024-01-23 16:13:18 -0500 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2024-01-23 17:45:51 -0500 |
| commit | 909a710a695654d13bf6ae824d0a62e682588583 (patch) | |
| tree | 3f14c1c393309b9e681fed2ef3054aca144d3e20 /test/ruby | |
| parent | 996776e936ac274946a359195ef3fa6a0dca7669 (diff) | |
[PRISM] Fix anonymous splat nodes
Fixes ruby/prism#2257.
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_compile_prism.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb index 8357914ce2..682f50d1d6 100644 --- a/test/ruby/test_compile_prism.rb +++ b/test/ruby/test_compile_prism.rb @@ -849,6 +849,13 @@ module Prism assert_prism_eval("*b, c = [1, 2, 3]; c") assert_prism_eval("a, *, c = [1, 2, 3]; a") assert_prism_eval("a, *, c = [1, 2, 3]; c") + + # Test anonymous splat node + assert_prism_eval(<<~RUBY) + def self.bar(*) = Array(*) + + bar([1, 2, 3]) + RUBY end ############################################################################ |
