diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-11-20 21:17:57 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-11-20 21:17:57 +0000 |
commit | 81bedc68ac9786004d304e2431897a07b8d26000 (patch) | |
tree | 83f9846f6be07462ff158982bad5df59a87fe892 /test/ruby/test_fiber.rb | |
parent | ee98d19128d0c12fcc469490269efccfe80f0984 (diff) | |
download | ruby-81bedc68ac9786004d304e2431897a07b8d26000.tar.gz |
* cont.c (fiber_switch): ignore fiber context switch
because destination fiber is same as current fiber.
With out this, it may segv on FreeBSD 9.
patched by Koichi Sasada.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_fiber.rb')
-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 7cf4a6b119..7127a9cb12 100644 --- a/test/ruby/test_fiber.rb +++ b/test/ruby/test_fiber.rb @@ -188,6 +188,11 @@ class TestFiber < Test::Unit::TestCase f2 = Fiber.new{ f1.resume } f1.transfer }, '[ruby-dev:40833]' + assert_normal_exit %q{ + require 'fiber' + Fiber.new{}.resume + 1.times{Fiber.current.transfer}' + } end def test_resume_root_fiber |