Actions
Bug #164
closedset_trace_func no longer reports 'line', 'call' and 'return' events
Description
=begin
Given the following code:
class Test
def test
a = 1
b = 2
end
end
set_trace_func proc {|event, file, line, id, binding, classname|
printf "%8s %s:%-2d %10s %8s\n", event, file, line, id, classname
}
t = Test.new
t.test
Run under 1.9:
dave[RUBY3/Book 22:09:47*] ruby -v t.rb
ruby 1.9.0 (2008-06-16 revision 15427) [i686-darwin9.3.0]
c-return t.rb:10 set_trace_func Kernel
c-call t.rb:11 new Class
c-call t.rb:11 initialize BasicObject
c-return t.rb:11 initialize BasicObject
c-return t.rb:11 new Class
But, under 1.8:
dave[RUBY3/Book 22:11:17*] /usr/bin/ruby -v t.rb
ruby 1.8.6 (2007-09-24 patchlevel 111) [universal-darwin9.0]
line t.rb:11 false
c-call t.rb:11 new Class
c-call t.rb:11 initialize Object
c-return t.rb:11 initialize Object
c-return t.rb:11 new Class
line t.rb:12 false
call t.rb:2 test Test
line t.rb:3 test Test
line t.rb:4 test Test
return t.rb:3 test Test
If this is deliberate, I'll update the documentation in the book.
Dave
=end
Actions
Like0
Like0Like0