* 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
This commit is contained in:
matz 2006-07-10 08:37:37 +00:00
parent c4ad5309f9
commit a1a07fbfa1
4 changed files with 36 additions and 21 deletions

View file

@ -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])}