diff options
author | U.Nakamura <usa@ruby-lang.org> | 2023-07-25 20:53:43 +0900 |
---|---|---|
committer | U.Nakamura <usa@ruby-lang.org> | 2023-07-25 20:53:43 +0900 |
commit | e55dde3bdddbc595be12e7184a23e729647eb989 (patch) | |
tree | 06dc9dea6c3a6dfa81d5b6ebcea87632cc4b4819 /test/ruby/test_syntax.rb | |
parent | aac3232ab09f649c5de86a1ef7b942de3cc218ce (diff) |
merge revision(s) 91c004885fc75a93cadf0094fa86ec3bd0ec25f5: [Backport #19025]
[Bug #19025] Numbered parameter names are always local variables
---
parse.y | 2 +-
test/ruby/test_syntax.rb | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
Diffstat (limited to 'test/ruby/test_syntax.rb')
-rw-r--r-- | test/ruby/test_syntax.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index 53036cab3b..39ad8875a0 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -1632,6 +1632,9 @@ eom assert_raise(NameError) {eval("_1")}, ] } + + assert_valid_syntax("proc {def foo(_);end;_1}") + assert_valid_syntax("p { [_1 **2] }") end def test_value_expr_in_condition |