diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-07-10 08:37:37 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-07-10 08:37:37 +0000 |
commit | a1a07fbfa1c0263cf3e51eca2bf2907a917bde5c (patch) | |
tree | edbd9074f62f822df5d796a459f989f124c186f2 /sample/test.rb | |
parent | c4ad5309f9cb4cd5c579360d36552f58a7239b35 (diff) | |
download | ruby-a1a07fbfa1c0263cf3e51eca2bf2907a917bde5c.tar.gz |
* sample/test.rb: update test suites.
* test/ruby/test_assignment.rb (TestAssignment::test_yield): ditto.
* test/ruby/test_iterator.rb (TestIterator::test_itertest): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10504 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 f7612736c3..b785d2db9f 100644 --- a/sample/test.rb +++ b/sample/test.rb @@ -127,6 +127,13 @@ a,b,*c = *[*[1,2]]; test_ok([a,b,c] == [1,2,[]]) def f; yield nil; end; f {|a| test_ok(a == nil)} def f; yield 1; end; f {|a| test_ok(a == 1)} +def f; yield []; end; f {|a| test_ok(a == [])} +def f; yield [1]; end; f {|a| test_ok(a == [1])} +def f; yield [nil]; end; f {|a| test_ok(a == [nil])} +def f; yield [[]]; end; f {|a| test_ok(a == [[]])} +def f; yield [*[]]; end; f {|a| test_ok(a == [])} +def f; yield [*[1]]; end; f {|a| test_ok(a == [1])} +def f; yield [*[1,2]]; end; f {|a| test_ok(a == [1,2])} def f; yield *[]; end; f {|a| test_ok(a == [])} def f; yield *[1]; end; f {|a| test_ok(a == [1])} def f; yield *[nil]; end; f {|a| test_ok(a == [nil])} |