mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
* 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/trunk@32334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c6ef31c933
commit
065fe8b7a4
4 changed files with 42 additions and 3 deletions
3
thread.c
3
thread.c
|
@ -4447,8 +4447,7 @@ call_trace_proc(VALUE args, int tracing)
|
|||
ID id = 0;
|
||||
VALUE klass = 0;
|
||||
|
||||
if (p->event == RUBY_EVENT_C_CALL ||
|
||||
p->event == RUBY_EVENT_C_RETURN) {
|
||||
if (p->klass != 0) {
|
||||
id = p->id;
|
||||
klass = p->klass;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue