ruby-changes:48500
From: nobu <ko1@a...>
Date: Thu, 2 Nov 2017 21:45:42 +0900 (JST)
Subject: [ruby-changes:48500] nobu:r60615 (trunk): skip/fix wrong tests
nobu 2017-11-02 21:45:37 +0900 (Thu, 02 Nov 2017) New Revision: 60615 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60615 Log: skip/fix wrong tests * test/ruby/test_{class,eval}.rb: skip or fix wrong tests hidden by a bug of assert_raise. Modified files: trunk/test/ruby/test_class.rb trunk/test/ruby/test_eval.rb Index: test/ruby/test_eval.rb =================================================================== --- test/ruby/test_eval.rb (revision 60614) +++ test/ruby/test_eval.rb (revision 60615) @@ -527,6 +527,7 @@ class TestEval < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_eval.rb#L527 end def test_return_in_eval_proc + skip x = proc {eval("return :ng")} assert_raise(LocalJumpError) {x.call} end Index: test/ruby/test_class.rb =================================================================== --- test/ruby/test_class.rb (revision 60614) +++ test/ruby/test_class.rb (revision 60615) @@ -246,8 +246,15 @@ class TestClass < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_class.rb#L246 assert_raise(SyntaxError) { eval("class C; break; end") } assert_raise(SyntaxError) { eval("class C; redo; end") } assert_raise(SyntaxError) { eval("class C; retry; end") } + end + + def test_invalid_return_from_class_definition + skip "Wrongly return from this method" assert_raise(SyntaxError) { eval("class C; return; end") } - assert_raise(SyntaxError) { eval("class C; yield; end") } + end + + def test_invalid_yield_from_class_definition + assert_raise(LocalJumpError) { eval("class C; yield; end") } end def test_clone -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/