diff options
author | Michael Leibowitz <michael.leibowitz@intel.com> | 2013-08-15 15:02:54 -0700 |
---|---|---|
committer | Michael Leibowitz <michael.leibowitz@intel.com> | 2013-08-15 15:02:54 -0700 |
commit | 6b0e2a11aeccf2ebc707c22548a0c15c8c2bae06 (patch) | |
tree | d9d59f4b502927634d32832e963db76629ff5a2e /eval_jump.c | |
parent | 3b35de2a90e26b99e2a6d4f61dc56d6ce7ded748 (diff) | |
download | ruby-6b0e2a11aeccf2ebc707c22548a0c15c8c2bae06.tar.gz ruby-6b0e2a11aeccf2ebc707c22548a0c15c8c2bae06.tar.bz2 ruby-6b0e2a11aeccf2ebc707c22548a0c15c8c2bae06.zip |
Imported Upstream version 1.9.3.p448upstream/1.9.3.p448upstream
Diffstat (limited to 'eval_jump.c')
-rw-r--r-- | eval_jump.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/eval_jump.c b/eval_jump.c index a8f0480..f3a1f78 100644 --- a/eval_jump.c +++ b/eval_jump.c @@ -99,6 +99,8 @@ rb_exec_end_proc(void) struct end_proc_data *volatile link; int status; volatile int safe = rb_safe_level(); + rb_thread_t *th = GET_THREAD(); + VALUE errinfo = th->errinfo; while (ephemeral_end_procs) { link = ephemeral_end_procs; @@ -112,6 +114,7 @@ rb_exec_end_proc(void) POP_TAG(); if (status) { error_handle(status); + if (!NIL_P(th->errinfo)) errinfo = th->errinfo; } xfree(link); } @@ -128,10 +131,12 @@ rb_exec_end_proc(void) POP_TAG(); if (status) { error_handle(status); + if (!NIL_P(th->errinfo)) errinfo = th->errinfo; } xfree(link); } rb_set_safe_level_force(safe); + th->errinfo = errinfo; } void |