diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-12-13 15:18:42 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-12-13 18:06:11 +0900 |
commit | 764da87ab02d30c578138bdb0f37e7c18f2d4371 (patch) | |
tree | b8096ba4f75f41b6442f01454ec04e12faf4bc84 | |
parent | 3262842e0adaed63935923bdc14884ac19d7549c (diff) | |
download | ruby-764da87ab02d30c578138bdb0f37e7c18f2d4371.tar.gz |
[Bug #19195] Allow optional newlines before closing parenthesis
-rw-r--r-- | parse.y | 2 | ||||
-rw-r--r-- | test/ruby/test_pattern_matching.rb | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -4901,7 +4901,7 @@ p_var_ref : '^' tIDENTIFIER } ; -p_expr_ref : '^' tLPAREN expr_value ')' +p_expr_ref : '^' tLPAREN expr_value rparen { /*%%%*/ $$ = NEW_BEGIN($3, &@$); diff --git a/test/ruby/test_pattern_matching.rb b/test/ruby/test_pattern_matching.rb index fbb934dc84..0337e5d945 100644 --- a/test/ruby/test_pattern_matching.rb +++ b/test/ruby/test_pattern_matching.rb @@ -464,6 +464,8 @@ END true end end + + assert_valid_syntax("1 in ^(1\n)") end def test_array_pattern |