summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-11 18:45:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-11 18:45:43 +0000
commit63d0ea4c03616e1f6f7e4be41c5de4cbb0a3a68e (patch)
treeed1cc95f95811b3e72704abeb09db66104a0d768 /vm.c
parent8dafe8c88df357cc1a26a6b565bf9efa625da204 (diff)
vm.c: pass exceptions while handling an exception
* vm.c (vm_exec): pass exceptions while handling an exception. * vm_trace.c (rb_threadptr_exec_event_hooks): propagate exceptions. revert r38293 partially. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vm.c b/vm.c
index 118dd13..da15fd2 100644
--- a/vm.c
+++ b/vm.c
@@ -1162,6 +1162,7 @@ vm_exec(rb_thread_t *th)
_tag.retval = Qnil;
if ((state = EXEC_TAG()) == 0) {
vm_loop_start:
+ _th->tag = &_tag;
result = vm_exec_core(th, initial);
if ((state = th->state) != 0) {
err = result;
@@ -1180,6 +1181,7 @@ vm_exec(rb_thread_t *th)
err = th->errinfo;
exception_handler:
+ TH_POP_TAG2();
cont_pc = cont_sp = catch_iseqval = 0;
while (th->cfp->pc == 0 || th->cfp->iseq == 0) {
@@ -1373,7 +1375,6 @@ vm_exec(rb_thread_t *th)
if (VM_FRAME_TYPE_FINISH_P(th->cfp)) {
vm_pop_frame(th);
th->errinfo = err;
- TH_POP_TAG2();
JUMP_TAG(state);
}
else {