summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorVladimir Dementyev <dementiev.vm@gmail.com>2020-06-14 22:00:51 +0300
committerKazuki Tsujimoto <kazuki@callcc.net>2020-06-27 13:51:03 +0900
commitc9ee34a18bb833b11ce64f6d35fa0e7f1a865a14 (patch)
treeaf0e6b55659d15008a799687196b05da15eb1e58 /test/ruby
parent5320375732a400ef915c8acbf810aed4ac5261b7 (diff)
Add #deconstruct cache to find pattern
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3104
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 78e3a4e8f3..8c529851b2 100644
--- a/test/ruby/test_pattern_matching.rb
+++ b/test/ruby/test_pattern_matching.rb
@@ -1340,6 +1340,15 @@ END
true
end
end
+
+ assert_block do
+ case CDeconstructCache.new([[0, :a, 1]])
+ in [*, String => x, *]
+ false
+ in [*, Symbol => x, *]
+ true
+ end
+ end
end
################################################################