diff options
author | ydah <[email protected]> | 2024-10-09 22:16:19 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2024-10-09 23:58:19 +0900 |
commit | 1c762d95664796275460025b37379753c0ac8e36 (patch) | |
tree | c9db5ac94a0bd4891c9a07710d79b7c0d31707b5 /test/ruby/test_syntax.rb | |
parent | e50754fcfaeb80bef93f043c13895ce386ddb18c (diff) |
[Bug #20789] Fix an invalid syntax error when `->a=1...{}`
https://bugs.ruby-lang.org/issues/20789
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11850
Diffstat (limited to 'test/ruby/test_syntax.rb')
-rw-r--r-- | test/ruby/test_syntax.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index 16bb914e3f..811a21937e 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -1975,6 +1975,7 @@ eom assert_valid_syntax('def nil(...) end') assert_valid_syntax('def true(...) end') assert_valid_syntax('def false(...) end') + assert_valid_syntax('->a=1...{}') unexpected = /unexpected \.{3}/ assert_syntax_error('iter do |...| end', /unexpected/) assert_syntax_error('iter {|...|}', /unexpected/) |