ruby-changes:48510
From: nobu <ko1@a...>
Date: Fri, 3 Nov 2017 09:52:58 +0900 (JST)
Subject: [ruby-changes:48510] nobu:r60625 (trunk): test/ruby/test_eval.rb: use orphan procs
nobu 2017-11-03 09:52:54 +0900 (Fri, 03 Nov 2017) New Revision: 60625 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60625 Log: test/ruby/test_eval.rb: use orphan procs This failure has been hidden by the bug of assert_raise which is fixed at r60614. Modified files: trunk/test/ruby/test_eval.rb Index: test/ruby/test_eval.rb =================================================================== --- test/ruby/test_eval.rb (revision 60624) +++ test/ruby/test_eval.rb (revision 60625) @@ -526,14 +526,21 @@ class TestEval < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_eval.rb#L526 }, '[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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/