diff options
author | Kazuki Tsujimoto <kazuki@callcc.net> | 2020-03-01 14:23:51 +0900 |
---|---|---|
committer | NARUSE, Yui <naruse@airemix.jp> | 2020-03-27 14:57:36 +0900 |
commit | 93aaa0bcce829b880d8f52a9168d17c93ecde85b (patch) | |
tree | 2fc71514137e3b41ec3cd0fe2a1e152fc8e3c327 /test/ruby/test_pattern_matching.rb | |
parent | 5ccf57f23eb7a35ac699edc2fc598c47fa1844a0 (diff) |
Allow trailing comma in hash pattern
(cherry picked from commit d25a4f413dce6ad3a8baaf61591415b9a8cce082)
Diffstat (limited to 'test/ruby/test_pattern_matching.rb')
-rw-r--r-- | test/ruby/test_pattern_matching.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_pattern_matching.rb b/test/ruby/test_pattern_matching.rb index 6dbb25ca86..a3b7dcfd18 100644 --- a/test/ruby/test_pattern_matching.rb +++ b/test/ruby/test_pattern_matching.rb @@ -1042,6 +1042,15 @@ END end end + assert_block do + case {a: 0, b: 1} + in {a: 1,} + false + in {a:,} + true + end + end + assert_syntax_error(%q{ case _ in "a-b": |