summaryrefslogtreecommitdiff
path: root/test/ruby/test_pattern_matching.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_pattern_matching.rb')
-rw-r--r--test/ruby/test_pattern_matching.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/ruby/test_pattern_matching.rb b/test/ruby/test_pattern_matching.rb
index 7531466f91..b8c445c806 100644
--- a/test/ruby/test_pattern_matching.rb
+++ b/test/ruby/test_pattern_matching.rb
@@ -1155,6 +1155,21 @@ END
end
end
+ [{a: 42}, {b: 42}].each do |i|
+ assert_block('newline should be insignificant after pattern label') do
+ case i
+ in a:
+ 0
+ true
+ in "b":
+ 0
+ true
+ else
+ false
+ end
+ end
+ end
+
assert_syntax_error(%q{
case _
in a:, a: