summaryrefslogtreecommitdiff
path: root/sample/test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'sample/test.rb')
-rw-r--r--sample/test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/sample/test.rb b/sample/test.rb
index 5c263090d0..3f9253b3ac 100644
--- a/sample/test.rb
+++ b/sample/test.rb
@@ -276,6 +276,13 @@ test_ok(a == 1)
a,=*[[[1]]]
test_ok(a == [1])
+x, (y, z) = 1, 2, 3
+test_ok([1,2,nil] == [x,y,z])
+x, (y, z) = 1, [2,3]
+test_ok([1,2,3] == [x,y,z])
+x, (y, z) = 1, [2]
+test_ok([1,2,nil] == [x,y,z])
+
a = loop do break; end; test_ok(a == nil)
a = loop do break nil; end; test_ok(a == nil)
a = loop do break 1; end; test_ok(a == 1)