diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | eval.c | 8 |
2 files changed, 12 insertions, 1 deletions
@@ -1,4 +1,7 @@ -Sun Jul 30 23:04:03 2006 Nobuyoshi Nakada <nobu@ruby-lang.org> +Sun Jul 30 23:26:22 2006 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * eval.c (rb_call0): trace call/return of method defined from block. + fixed: [ruby-core:08329] * eval.c (rb_trap_eval): make the current thread runnable to deal with exceptions which occurred within the trap. fixed: [ruby-dev:27729] @@ -5838,7 +5838,15 @@ rb_call0(klass, recv, id, oid, argc, argv, body, flags) case NODE_BMETHOD: ruby_frame->flags |= FRAME_DMETH; + if (event_hooks) { + struct BLOCK *data; + Data_Get_Struct(body->nd_cval, struct BLOCK, data); + EXEC_EVENT_HOOK(RUBY_EVENT_CALL, data->body, recv, id, klass); + } result = proc_invoke(body->nd_cval, rb_ary_new4(argc, argv), recv, klass); + if (event_hooks) { + EXEC_EVENT_HOOK(RUBY_EVENT_RETURN, body, recv, id, klass); + } break; case NODE_SCOPE: |