mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/test_iterator.rb (test_block_passing): more tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
97348a2dad
commit
1de10a2395
1 changed files with 6 additions and 0 deletions
|
@ -193,7 +193,13 @@ class TestIterator < Test::Unit::TestCase
|
|||
m(yield(var), &block)
|
||||
end
|
||||
|
||||
def m4(&block)
|
||||
m(m1(), &block)
|
||||
end
|
||||
|
||||
def test_block_passing
|
||||
assert(!m4())
|
||||
assert(!m4 {})
|
||||
assert_equal(100, m3(10) {|x|x*x})
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue