summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2024-01-23 13:20:49 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2024-01-24 12:04:44 -0800
commitbb6af9287b2002c736e1f50a74a57922f61e8a53 (patch)
tree8f6b43ca7e476779278b78ffb988891616f26258 /test/ruby
parent03f76f098ada081c8ce1db25ddc9b9fc21608877 (diff)
Fix local table space for `*_`
We need to make sure there is enough room in the local table for repeated `*_` parameters Co-Authored-By: Matt Valentine-House <matt@eightbitraptor.com>
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_compile_prism.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb
index e5401fab9d..7f4cf49bb4 100644
--- a/test/ruby/test_compile_prism.rb
+++ b/test/ruby/test_compile_prism.rb
@@ -1545,6 +1545,10 @@ a
CODE
end
+ def test_repeated_splat_underscore
+ assert_prism_eval("def self.m(_, _, _ = 1, _ = 2, *_); end; method(:m).parameters")
+ end
+
def test_repeated_optional_underscore
assert_prism_eval("def self.m(a, _, _, _ = 1, _ = 2, b); end; method(:m).parameters")
end