aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-03-02 15:49:03 +0900
committerNARUSE, Yui <naruse@airemix.jp>2020-03-27 14:57:42 +0900
commit004c298738dc0924e7483b0c3f41c798dabe9e5b (patch)
tree95a0ce32442772382a2e1c3dced844ab3f5b5581 /test
parent93aaa0bcce829b880d8f52a9168d17c93ecde85b (diff)
downloadruby-004c298738dc0924e7483b0c3f41c798dabe9e5b.tar.gz
Allow newlines inside braced pattern
(cherry picked from commit f5c904c2a907013e22ff74bc3686952c5448d493)
Diffstat (limited to 'test')
-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":