From bbb7ab906ec64b963bd4b5d37e47b14796d64371 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Mon, 29 Jan 2024 16:35:54 -0500 Subject: [PRISM] Fix crash when multiple underscores Fixes ruby/prism#2295. --- test/ruby/test_compile_prism.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb index 48912c31f6..901cc0741e 100644 --- a/test/ruby/test_compile_prism.rb +++ b/test/ruby/test_compile_prism.rb @@ -2203,6 +2203,11 @@ end assert_prism_eval("Object.tap { || }") assert_prism_eval("[1].map { |num| num }") assert_prism_eval("[1].map { |a; b| b = 2; a + b}") + + # Test block parameters with multiple _ + assert_prism_eval(<<~RUBY) + [[1, 2, 3, 4, 5, 6]].map { |(_, _, _, _, _, _)| _ } + RUBY end def test_FowardingParameterNode -- cgit v1.2.3