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: add tests for r33684 (Fiber#resume).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2011-11-09 10:02:22 +00:00
parent 572e4807e6
commit 0c215e34df
2 changed files with 28 additions and 1 deletions

View file

@ -1,10 +1,14 @@
Wed Nov 9 19:00:44 2011 Koichi Sasada <ko1@atdot.net>
* test/ruby/test_fiber.rb: add tests for r33684 (Fiber#resume).
Wed Nov 9 16:40:49 2011 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/win32.c (unixtime_to_filetime): should check the return value
of localtime(). reported by snowjail at gmail.com.
[ruby-dev:44838] [Bug #5596]
Thu Nov 10 05:17:25 2011 Koichi Sasada <ko1@atdot.net>
Thu Nov 9 13:17:25 2011 Koichi Sasada <ko1@atdot.net>
* cont.c (rb_fiber_m_transfer, rb_fiber_resume): prohibit using
"resume" after "transfer" method are used. You should not mix

View file

@ -220,5 +220,28 @@ class TestFiber < Test::Unit::TestCase
end
assert_equal("Can't call on top of Fiber or Thread", error.message, bug5083)
end
def test_prohibit_resume_transfered_fiber
assert_raise(FiberError){
root_fiber = Fiber.current
f = Fiber.new{
root_fiber.transfer
}
f.transfer
f.resume
}
assert_raise(FiberError){
g=nil
f=Fiber.new{
g.resume
g.resume
}
g=Fiber.new{
f.resume
f.resume
}
f.transfer
}
end
end