summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorKazuki Tsujimoto <kazuki@callcc.net>2020-03-01 14:23:51 +0900
committerKazuki Tsujimoto <kazuki@callcc.net>2020-03-01 14:35:48 +0900
commitd25a4f413dce6ad3a8baaf61591415b9a8cce082 (patch)
tree3a70e1d5db878ae2dfbe58f0c97d92e7e43df720 /test/ruby
parent356e032e1a622c9e34c1c48b516861db10b3b31b (diff)
Allow trailing comma in hash pattern
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_pattern_matching.rb9
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":