summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-10 08:28:22 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-10 08:28:22 (GMT)
commit04e348e61ad5cfde94311b38c9b4f8581e205c0d (patch)
tree010dc94cc2b25a034af18f7d2ff4f0253e410f02 /thread.c
parentab38e5b5851288753e841182f112d778d713dc91 (diff)
* thread.c (thread_join): Fixnum (except TAG_FATAL) and
NODE should not be reached here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/thread.c b/thread.c
index e1bed76..0cfb4e7 100644
--- a/thread.c
+++ b/thread.c
@@ -884,11 +884,16 @@ thread_join(rb_thread_t *target_th, double delay)
VALUE err = target_th->errinfo;
if (FIXNUM_P(err)) {
- /* */
+ switch (err) {
+ case INT2FIX(TAG_FATAL):
+ /* OK. killed. */
+ break;
+ default:
+ rb_bug("thread_join: Fixnum (%d) should not reach here.", FIX2INT(err));
+ }
}
else if (RB_TYPE_P(target_th->errinfo, T_NODE)) {
- rb_exc_raise(rb_vm_make_jump_tag_but_local_jump(
- GET_THROWOBJ_STATE(err), GET_THROWOBJ_VAL(err)));
+ rb_bug("thread_join: NODE should not reach here.");
}
else {
/* normal exception */