summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-03-02 15:49:03 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-03-02 15:49:03 +0900
commitf5c904c2a907013e22ff74bc3686952c5448d493 (patch)
tree8ab640d703c8f34eea55dd094dfbafbe3e3e6fbe /test/ruby
parent0711ceeb376deba69e35c9ecf088b9fb254c54ce (diff)
Allow newlines inside braced pattern
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_pattern_matching.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/ruby/test_pattern_matching.rb b/test/ruby/test_pattern_matching.rb
index a3b7dcfd18..f9217aa7da 100644
--- a/test/ruby/test_pattern_matching.rb
+++ b/test/ruby/test_pattern_matching.rb
@@ -1051,6 +1051,20 @@ END
end
end
+ assert_block do
+ case {a: 0}
+ in {a: 1
+ }
+ false
+ in {a:
+ 2}
+ false
+ in {a:
+ }
+ true
+ end
+ end
+
assert_syntax_error(%q{
case _
in "a-b":