aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-03 00:52:54 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-03 00:52:54 +0000
commit7b08feb9f298f7b7f81746dee461045e21c7d191 (patch)
tree7d76d24b4f9bc5835d77becc8c1372a63837dd2d /test
parentce1087688ca5711276aa1e0ecb5d8024e619d2d8 (diff)
downloadruby-7b08feb9f298f7b7f81746dee461045e21c7d191.tar.gz
test/ruby/test_eval.rb: use orphan procs
This failure has been hidden by the bug of assert_raise which is fixed at r60614. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_eval.rb13
1 files changed, 10 insertions, 3 deletions
diff --git a/test/ruby/test_eval.rb b/test/ruby/test_eval.rb
index c73dfde9a7..9f25b771bf 100644
--- a/test/ruby/test_eval.rb
+++ b/test/ruby/test_eval.rb
@@ -526,14 +526,21 @@ class TestEval < Test::Unit::TestCase
}, '[Bug #10368]'
end
+ def orphan_proc
+ proc {eval("return :ng")}
+ end
+
+ def orphan_lambda
+ lambda {eval("return :ok")}
+ end
+
def test_return_in_eval_proc
- skip
- x = proc {eval("return :ng")}
+ x = orphan_proc
assert_raise(LocalJumpError) {x.call}
end
def test_return_in_eval_lambda
- x = lambda {eval("return :ok")}
+ x = orphan_lambda
assert_equal(:ok, x.call)
end
end