From f2149dc094a92bd1aa29622f9585247d491f7a08 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 10 Jan 2024 16:27:00 -0800 Subject: [PRISM] Support repeated required parameter names. Fixes: https://github.com/ruby/prism/issues/2062 This patch only fixes positional parameters, we still need to fix the other cases spelled out in test/prism/fixtures/repeat_parameters.txt --- 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 99f932a238..835b3b819b 100644 --- a/test/ruby/test_compile_prism.rb +++ b/test/ruby/test_compile_prism.rb @@ -1299,6 +1299,10 @@ module Prism CODE end + def test_repeated_method_params + assert_prism_eval("def self.foo(_a, _a); _a; end; foo(1, 2)") + end + def test_method_parameters assert_prism_eval(<<-CODE) def self.prism_test_method_parameters(a, b=1, *c, d:, e: 2, **f, &g) -- cgit v1.2.3