summaryrefslogtreecommitdiff
path: root/test/ruby/test_pattern_matching.rb
diff options
context:
space:
mode:
authorS-H-GAMELINKS <[email protected]>2024-02-01 19:50:40 +0900
committerKazuki Tsujimoto <[email protected]>2024-03-04 12:33:00 +0900
commit2d8788e90cd535933c0f444112d465cffc4c71b1 (patch)
treea1151ca0a92002f28db766c88b324c11faa091a3 /test/ruby/test_pattern_matching.rb
parent5621d794a2fa9293d1da489d6b0ee0e7c73c9128 (diff)
Support NODE_ONCE for pattern matching
Diffstat (limited to 'test/ruby/test_pattern_matching.rb')
-rw-r--r--test/ruby/test_pattern_matching.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_pattern_matching.rb b/test/ruby/test_pattern_matching.rb
index 8e2806581c..db6ad06b82 100644
--- a/test/ruby/test_pattern_matching.rb
+++ b/test/ruby/test_pattern_matching.rb
@@ -354,6 +354,14 @@ END
end
assert_block do
+ a = "abc"
+ case 'abc'
+ in /#{a}/o
+ true
+ end
+ end
+
+ assert_block do
case 0
in ->(i) { i == 0 }
true