diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-11 00:39:04 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-11 00:39:04 +0000 |
commit | 3360e3e7eafd0a7c19af8dc13b9adba4baee0c48 (patch) | |
tree | deba4b631db5c5b1f811bb2b527f7c7f4f37c4ee /vm_insnhelper.c | |
parent | e1fd55ae00adc7855f459383a22bb36b4de5ffa5 (diff) |
merges r32334 and r32335 from trunk into ruby_1_9_2.
--
* vm_insnhelper.c (vm_call_bmethod): fix to hook call/return event
for methods defined by define_method().
* thread.c (call_trace_proc): Fix to skip if class is not given (0).
Note that ID and Class object are passed for call/return event
if the called method was defined by define_method().
If you are author of tracer/profiler/debugger, this may be an
important change. You should check passed class as zero or
non-zero instead of checking the event type.
* test/ruby/test_settracefunc.rb: add a test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@32924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 26664ddc13..d760d17e96 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -419,11 +419,15 @@ vm_call_bmethod(rb_thread_t *th, VALUE recv, int argc, const VALUE *argv, rb_proc_t *proc; VALUE val; + EXEC_EVENT_HOOK(th, RUBY_EVENT_CALL, recv, me->called_id, me->klass); + /* control block frame */ th->passed_me = me; - GetProcPtr(me->def->body.proc, proc); val = rb_vm_invoke_proc(th, proc, recv, argc, argv, blockptr); + + EXEC_EVENT_HOOK(th, RUBY_EVENT_RETURN, recv, me->called_id, me->klass); + return val; } |