From 92b10f5be7453aceb5863e46ac775a4ddbf83b97 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 16 Dec 2023 01:07:06 +0900 Subject: [Bug #20062] Fixed numbered parameter syntax error At the method definition, the local scope that saves the context of the numbered parameters needs to be pushed before saving. --- test/ruby/test_syntax.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'test/ruby') diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index 8643bfaf95..c6a6717d25 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -1767,6 +1767,7 @@ eom assert_valid_syntax("proc {def foo(_);end;_1}") assert_valid_syntax("p { [_1 **2] }") + assert_valid_syntax("proc {_1;def foo();end;_1}") end def test_it -- cgit v1.2.3