mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
* 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:
parent
c4ad5309f9
commit
a1a07fbfa1
4 changed files with 36 additions and 21 deletions
|
@ -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])}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue