diff options
| author | Aaron Patterson <tenderlove@ruby-lang.org> | 2024-01-10 16:27:00 -0800 |
|---|---|---|
| committer | Aaron Patterson <aaron.patterson@gmail.com> | 2024-01-11 11:31:59 -0800 |
| commit | f2149dc094a92bd1aa29622f9585247d491f7a08 (patch) | |
| tree | 2617a515e15f243966fc4e549daf0e4c046905a4 /test/ruby | |
| parent | 72be7860170d2ccec7713a2b0ef43da133799d71 (diff) | |
[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
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 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) |
