aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_fiber.rb5
-rw-r--r--test/ruby/test_thread.rb5
2 files changed, 2 insertions, 8 deletions
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