diff options
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_pattern_matching.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_pattern_matching.rb b/test/ruby/test_pattern_matching.rb index b0d8e4778b..9153297d39 100644 --- a/test/ruby/test_pattern_matching.rb +++ b/test/ruby/test_pattern_matching.rb @@ -1072,4 +1072,16 @@ END end end end + + ################################################################ + + def test_struct + assert_block do + s = Struct.new(:a, :b) + case s[0, 1] + in 0, 1 + true + end + end + end end |