diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-15 03:22:51 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-15 03:22:51 +0000 |
commit | 70df6311af85b7f53b5c730502d4b9a94fa23cc9 (patch) | |
tree | e2e1d7a30c12579af1cc471a2705efbd37fbba57 /eval.c | |
parent | 31ac946975a8e20157e1f47d23546ae237484024 (diff) |
* eval.c (ruby_finalize_1): rb_thread_t#errinfo should be clear with
Qnil.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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); } |