From 799a6bc67ba9e076a8b75c5ce076b010df17df94 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 30 Jul 2006 14:27:01 +0000 Subject: [PATCH] * eval.c (rb_call0): trace call/return of method defined from block. fixed: [ruby-core:08329] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 ++++- eval.c | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 062a2deb76..3735b3bcb0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ -Sun Jul 30 23:04:03 2006 Nobuyoshi Nakada +Sun Jul 30 23:26:12 2006 Nobuyoshi Nakada + + * 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] diff --git a/eval.c b/eval.c index 9bc43db6e7..385684813a 100644 --- a/eval.c +++ b/eval.c @@ -5797,7 +5797,15 @@ rb_call0(VALUE klass, VALUE recv, ID id, ID oid, case NODE_BMETHOD: PUSH_METHOD_FRAME(); 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, 1); + if (event_hooks) { + EXEC_EVENT_HOOK(RUBY_EVENT_RETURN, body, recv, id, klass); + } POP_FRAME(); break;