diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-09-09 01:39:58 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-09-09 01:39:58 +0000 |
commit | 80edcf82a1498caa58a53668c8b311cbcf98816d (patch) | |
tree | faf1b12374f060e4bc6dbd0c376251ff7a2fa000 /test/ruby | |
parent | 9edcc5e99af8a859b0b3f4f0f3ac9174a611d8c9 (diff) | |
download | ruby-80edcf82a1498caa58a53668c8b311cbcf98816d.tar.gz |
* eval.c (struct tag): dst should be VALUE.
* eval.c (localjump_destination): stop at the scope where the current
block was created. [ruby-dev:21353]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_iterator.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/ruby/test_iterator.rb b/test/ruby/test_iterator.rb index 4947ed26ce..83bfb25255 100644 --- a/test/ruby/test_iterator.rb +++ b/test/ruby/test_iterator.rb @@ -179,7 +179,7 @@ class TestIterator < Test::Unit::TestCase m(block_given?,&proc{}) end - def test_block_in_arg + def test_block_given assert(m1{p 'test'}) assert(m2{p 'test'}) assert(!m1()) @@ -299,6 +299,7 @@ class TestIterator < Test::Unit::TestCase lambda = lambda{44} assert_raises(LocalJumpError) {get_block{break}.call} assert_nothing_raised {lambda{break}.call} + assert_instance_of(LocalJumpError, (get_block{break}.call rescue $!)) assert_equal(-1, block.arity) assert_equal(-1, lambda.arity) @@ -319,7 +320,7 @@ class TestIterator < Test::Unit::TestCase marity_test(:p) lambda(&method(:assert)).call(true) - lambda(&get_block{|a,n| assert(a,n)}).call(true, 2) + lambda(&get_block{|a,n| assert(a,n)}).call(true, "marity") end class ITER_TEST1 |