summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-09 19:06:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-09 19:06:39 +0000
commit09205cf2c3334b078677c430d83b42352d929a26 (patch)
treeabf1824752954b0babdb703061b88c2d4769524e /vm.c
parent520053232e76b03952b7e80be2c5a906132de195 (diff)
* vm.c (vm_exec): reset thread state before starting vm loop.
[ruby-core:28129] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/vm.c b/vm.c
index 1cee983351..5f61c6c99c 100644
--- a/vm.c
+++ b/vm.c
@@ -1121,6 +1121,8 @@ vm_exec(rb_thread_t *th)
_tag.retval = Qnil;
if ((state = EXEC_TAG()) == 0) {
vm_loop_start:
+ th->state = 0;
+ th->errinfo = Qnil;
result = vm_exec_core(th, initial);
if ((state = th->state) != 0) {
err = result;
@@ -1189,7 +1191,6 @@ vm_exec(rb_thread_t *th)
#else
*th->cfp->sp++ = (GET_THROWOBJ_VAL(err));
#endif
- th->errinfo = Qnil;
goto vm_loop_start;
}
}
@@ -1226,7 +1227,6 @@ vm_exec(rb_thread_t *th)
escape_dfp = GET_THROWOBJ_CATCH_POINT(err);
if (cfp->dfp == escape_dfp) {
cfp->pc = cfp->iseq->iseq_encoded + entry->cont;
- th->errinfo = Qnil;
goto vm_loop_start;
}
}
@@ -1258,7 +1258,6 @@ vm_exec(rb_thread_t *th)
*th->cfp->sp++ = (GET_THROWOBJ_VAL(err));
#endif
}
- th->errinfo = Qnil;
goto vm_loop_start;
}
}
@@ -1302,8 +1301,6 @@ vm_exec(rb_thread_t *th)
cfp->self, (VALUE)cfp->dfp, catch_iseq->iseq_encoded,
cfp->sp + 1 /* push value */, cfp->lfp, catch_iseq->local_size - 1);
- state = 0;
- th->errinfo = Qnil;
goto vm_loop_start;
}
else {