diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-20 09:08:10 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-20 09:08:10 +0000 |
commit | 0a00413ee766a798d6ce989728a6c3749f003d8e (patch) | |
tree | c550ddfb3342550ce25d105f12b6a4d646cc7022 /test | |
parent | ddcc7aff1ba08011a78cd1a55ce0637c9af3215e (diff) | |
download | ruby-0a00413ee766a798d6ce989728a6c3749f003d8e.tar.gz ruby-0a00413ee766a798d6ce989728a6c3749f003d8e.tar.xz ruby-0a00413ee766a798d6ce989728a6c3749f003d8e.zip |
merges r23616 from trunk into ruby_1_9_1.
--
* cont.c (cont_capture, fiber_store): reraise transferred error.
* cont.c (fiber_switch): transfers dead fiber error to the previouse
or root fiber if the current fiber is dead. [ruby-core:23651]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@23766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_fiber.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_fiber.rb b/test/ruby/test_fiber.rb index bf56b2b6d..e23939068 100644 --- a/test/ruby/test_fiber.rb +++ b/test/ruby/test_fiber.rb @@ -164,5 +164,10 @@ class TestFiber < Test::Unit::TestCase assert_equal(nil, Thread.current[:v]); fb.resume assert_equal(nil, Thread.current[:v]); end + + def test_resume_self + f = Fiber.new {f.resume} + assert_raise(FiberError, '[ruby-core:23651]') {f.transfer} + end end |