From: Kent Sibilev Date: 2006-07-21T12:21:56+09:00 Subject: Trace API bug Hi Everyone, I've noticed a small bug while playing with my ruby-debug extension. I think the current Ruby interpreter misses a 'call' event when calling a method defined with Module#define_method. Below is the small script that proves it: $ cat -n t.rb 1 class A 2 def m1 3 "m1 called\n" 4 end 5 define_method("m2") do 6 "m2 called\n" 7 end 8 end 9 10 a = A.new 11 set_trace_func proc {|event, file, line, *args| puts "#{event}:#{line}"} 12 13 a.m1 14 a.m2 15 $ ruby t.rb line:13 call:2 line:3 return:4 line:14 line:6 Notice how the invocation of A#m2 doesn't emit any 'call' or 'c-call' events. -- Kent --- http://www.datanoise.com