summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-17 06:48:05 +0000
committerktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-17 06:48:05 +0000
commit9c9db64d7e9058dc6fc7ead3791b259685798806 (patch)
tree205cc2d83c632072ba219fb3a9f5593709a3e37e /test
parent9738f96fcfe50b2a605e350bdd40bd7a85665f54 (diff)
Define Struct#deconstruct
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_pattern_matching.rb12
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