1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/ruby/test_fiber.rb (TestFiber#test_no_valid_cfp):

add a test. Unlike TestThread#test_no_valid_cfp,
  this test succeeds even if win32ole is required (see r33153).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ktsj 2011-09-03 15:54:44 +00:00
parent aa6ebbe329
commit 7c9b9977b0
2 changed files with 18 additions and 0 deletions

View file

@ -1,3 +1,9 @@
Sun Sep 4 00:47:39 2011 Kazuki Tsujimoto <kazuki@callcc.net>
* test/ruby/test_fiber.rb (TestFiber#test_no_valid_cfp):
add a test. Unlike TestThread#test_no_valid_cfp,
this test succeeds even if win32ole is required (see r33153).
Sun Sep 4 00:11:49 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* variable.c (rb_const_set): show the previous definition

View file

@ -208,5 +208,17 @@ class TestFiber < Test::Unit::TestCase
GC.start
}, bug4612
end
def test_no_valid_cfp
bug5083 = '[ruby-dev:44208]'
error = assert_raise(RuntimeError) do
Fiber.new(&Module.method(:nesting)).resume
end
assert_equal("Can't call on top of Fiber or Thread", error.message, bug5083)
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)
end
end