From fe360c463c920dbb16284f3cede4c34f32162f77 Mon Sep 17 00:00:00 2001 From: ktsj Date: Sun, 18 Aug 2013 11:27:42 +0000 Subject: * variable.c, vm_method.c: remove dead code. * test/ruby/test_fiber.rb, test/ruby/test_thread.rb: change accordingly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_fiber.rb | 5 +---- test/ruby/test_thread.rb | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'test/ruby') diff --git a/test/ruby/test_fiber.rb b/test/ruby/test_fiber.rb index 25a4608c8a..f3cfaa273b 100644 --- a/test/ruby/test_fiber.rb +++ b/test/ruby/test_fiber.rb @@ -217,10 +217,7 @@ class TestFiber < Test::Unit::TestCase def test_no_valid_cfp bug5083 = '[ruby-dev:44208]' assert_equal([], Fiber.new(&Module.method(:nesting)).resume) - error = assert_raise(RuntimeError) do - Fiber.new(&Module.method(:undef_method)).resume(:to_s) - end - assert_equal("Can't call on top of Fiber or Thread", error.message, bug5083) + assert_instance_of(Class, Fiber.new(&Class.new.method(:undef_method)).resume(:to_s)) end def test_prohibit_resume_transfered_fiber diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index 6f33a120f7..dd13842bfe 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -493,10 +493,7 @@ class TestThread < Test::Unit::TestCase skip 'with win32ole, cannot run this testcase because win32ole redefines Thread#intialize' if defined?(WIN32OLE) bug5083 = '[ruby-dev:44208]' assert_equal([], Thread.new(&Module.method(:nesting)).value) - error = assert_raise(RuntimeError) do - Thread.new(:to_s, &Module.method(:undef_method)).join - end - assert_equal("Can't call on top of Fiber or Thread", error.message, bug5083) + assert_instance_of(Thread, Thread.new(:to_s, &Class.new.method(:undef_method)).join) end def make_handle_interrupt_test_thread1 flag -- cgit v1.2.3