From ef68f94af053789115a29e945292537597120116 Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 4 Apr 2003 05:12:19 +0000 Subject: * eval.c (assign): should prepare mrhs by svalue_to_mrhs(). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- sample/test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sample') diff --git a/sample/test.rb b/sample/test.rb index 5c263090d..3f9253b3a 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) -- cgit