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 | ef68f94af053789115a29e945292537597120116 (patch) | |
| tree | ff756a754747d414cc8c81b81ca2f6aef3ea846b /sample | |
| parent | bcf870d639c09fb458e781d274c8af6feb07cc98 (diff) | |
| download | ruby-ef68f94af053789115a29e945292537597120116.tar.gz ruby-ef68f94af053789115a29e945292537597120116.tar.xz ruby-ef68f94af053789115a29e945292537597120116.zip | |
* 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
Diffstat (limited to 'sample')
| -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 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) |
