summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-19 09:17:21 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-19 09:17:21 (GMT)
commit59bdf7eac8dfaf740e2c87da93efdfc96b1c9469 (patch)
tree516f3fdd1627b5d77429102667c26a11882a9b83 /vm.c
parentc4bbf190fdff49686fe67310728831e0777bc04b (diff)
* vm_core.h: add VM_FRAME_MAGIC_RESCUE to recognize normal block or
rescue clause. * vm.c (vm_exec): use VM_FRAME_MAGIC_RESCUE on at rescue/ensure. * test/ruby/test_settracefunc.rb: should not invoke b_return at rescue clause. [Bug #9957] * vm_dump.c (control_frame_dump): check VM_FRAME_MAGIC_RESCUE. * vm_dump.c (vm_stack_dump_each): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46463 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 b4e7a5c..dccb36a 100644
--- a/vm.c
+++ b/vm.c
@@ -1216,6 +1216,7 @@ vm_frametype_name(const rb_control_frame_t *cfp)
case VM_FRAME_MAGIC_IFUNC: return "ifunc";
case VM_FRAME_MAGIC_EVAL: return "eval";
case VM_FRAME_MAGIC_LAMBDA: return "lambda";
+ case VM_FRAME_MAGIC_RESCUE: return "rescue";
default:
rb_bug("unknown frame");
}
@@ -1520,7 +1521,7 @@ vm_exec(rb_thread_t *th)
/* push block frame */
cfp->sp[0] = err;
- vm_push_frame(th, catch_iseq, VM_FRAME_MAGIC_BLOCK,
+ vm_push_frame(th, catch_iseq, VM_FRAME_MAGIC_RESCUE,
cfp->self, cfp->klass,
VM_ENVVAL_PREV_EP_PTR(cfp->ep),
catch_iseq->iseq_encoded,