summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-10 08:31:48 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-10 08:31:48 +0000
commit4599d3efd7bfda591fd29e5647af2d5aa8be486c (patch)
tree3d7fddc4a9a1c7176914ed490cae60dce8c7bc43 /vm.c
parentd63f9e933cf3ef44d7c6733bb6353ccde4324007 (diff)
* vm.c (vm_exec): support :b_return event for "lambda{return}.call".
[Bug #8622] * test/ruby/test_settracefunc.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/vm.c b/vm.c
index 0ade176..0193b7b 100644
--- a/vm.c
+++ b/vm.c
@@ -1290,6 +1290,13 @@ vm_exec(rb_thread_t *th)
if (!catch_iseqval) {
result = GET_THROWOBJ_VAL(err);
th->errinfo = Qnil;
+
+ switch (VM_FRAME_TYPE(cfp)) {
+ case VM_FRAME_MAGIC_LAMBDA:
+ EXEC_EVENT_HOOK_AND_POP_FRAME(th, RUBY_EVENT_B_RETURN, th->cfp->self, 0, 0, Qnil);
+ break;
+ }
+
vm_pop_frame(th);
goto finish_vme;
}
@@ -1435,6 +1442,7 @@ vm_exec(rb_thread_t *th)
EXEC_EVENT_HOOK_AND_POP_FRAME(th, RUBY_EVENT_RETURN, th->cfp->self, 0, 0, Qnil);
break;
case VM_FRAME_MAGIC_BLOCK:
+ case VM_FRAME_MAGIC_LAMBDA:
EXEC_EVENT_HOOK_AND_POP_FRAME(th, RUBY_EVENT_B_RETURN, th->cfp->self, 0, 0, Qnil);
break;
case VM_FRAME_MAGIC_CLASS: