aboutsummaryrefslogtreecommitdiffstats
path: root/cont.c
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-15 15:46:07 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-15 15:46:07 +0000
commit54619f8d1e1c582b989bb910c2f5dadfde2d530b (patch)
treec4daea986b3ab93576eb84ec9a5e5858f2ce4c8f /cont.c
parent48bcb55c41135ed72805ebc7847ad3570867c099 (diff)
downloadruby-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 'cont.c')
-rw-r--r--cont.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cont.c b/cont.c
index 01800a6016..be8c982228 100644
--- a/cont.c
+++ b/cont.c
@@ -1174,7 +1174,8 @@ rb_fiber_start(void)
}
else {
VALUE err = rb_vm_make_jump_tag_but_local_jump(state, th->errinfo);
- rb_threadptr_async_errinfo_enque(th, err);
+ if (!NIL_P(err))
+ rb_threadptr_async_errinfo_enque(th, err);
}
RUBY_VM_SET_INTERRUPT(th);
}