diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | eval.c | 5 |
2 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Fri Jun 15 12:22:10 2007 Koichi Sasada <ko1@atdot.net> + + * eval.c (ruby_finalize_1): rb_thread_t#errinfo should be clear with + Qnil. + Fri Jun 15 12:20:11 2007 Koichi Sasada <ko1@atdot.net> * cont.c (rb_cont_call): forbid cross fiber continuation call. @@ -137,7 +137,7 @@ static void ruby_finalize_1(void) { signal(SIGINT, SIG_DFL); - GET_THREAD()->errinfo = 0; + GET_THREAD()->errinfo = Qnil; rb_clear_trace_func(); rb_gc_call_finalizer_at_exit(); } @@ -668,6 +668,7 @@ rb_longjmp(int tag, VALUE mesg) th->errinfo = exception_error; JUMP_TAG(TAG_FATAL); } + if (NIL_P(mesg)) mesg = GET_THREAD()->errinfo; if (NIL_P(mesg)) { @@ -709,10 +710,12 @@ rb_longjmp(int tag, VALUE mesg) } rb_trap_restore_mask(); + if (tag != TAG_FATAL) { EXEC_EVENT_HOOK(th, RUBY_EVENT_RAISE, th->cfp->self, 0 /* TODO: id */, 0 /* TODO: klass */); } + thread_reset_raised(th); JUMP_TAG(tag); } |