diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-15 15:46:07 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-15 15:46:07 +0000 |
commit | 54619f8d1e1c582b989bb910c2f5dadfde2d530b (patch) | |
tree | c4daea986b3ab93576eb84ec9a5e5858f2ce4c8f /test | |
parent | 48bcb55c41135ed72805ebc7847ad3570867c099 (diff) | |
download | ruby-54619f8d1e1c582b989bb910c2f5dadfde2d530b.tar.gz |
* cont.c (rb_fiber_start): don't enqueue Qnil to async_errinfo_queue.
rb_vm_make_jump_tag_but_local_jump() could return Qnil (ex. when
finished by Thread.exit). [ruby-dev:45218] [Bug #5993]
* test/ruby/test_fiber.rb (test_exit_in_fiber): add test for it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_fiber.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_fiber.rb b/test/ruby/test_fiber.rb index 611b119033..7f15e74118 100644 --- a/test/ruby/test_fiber.rb +++ b/test/ruby/test_fiber.rb @@ -262,5 +262,12 @@ class TestFiber < Test::Unit::TestCase assert_equal(0, status.exitstatus, bug5700) assert_equal(false, status.signaled?, bug5700) end + + def test_exit_in_fiber + bug5993 = '[ruby-dev:45218]' + assert_nothing_raised(bug5993) do + Thread.new{ Fiber.new{ Thread.exit }.resume }.join + end + end end |