diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-04-04 05:12:19 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-04-04 05:12:19 +0000 |
commit | 79557dcbb0198f3f33951835469e47734d0ffb6d (patch) | |
tree | ff756a754747d414cc8c81b81ca2f6aef3ea846b /sample/test.rb | |
parent | 75c2f3cbc5ebc106821f71adf43d2b0af0e38dc1 (diff) |
* eval.c (assign): should prepare mrhs by svalue_to_mrhs().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/test.rb')
-rw-r--r-- | sample/test.rb | 7 |
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) |