Issue #4720 has been reported by Richard Ramsden.

----------------------------------------
Feature #4720: Added documentation for lib/tracer.rb
http://redmine.ruby-lang.org/issues/4720

Author: Richard Ramsden
Status: Open
Priority: Normal
Assignee: Eric Hodel
Category: 
Target version: 1.9.2


I decided to document lib/tracer.rb since it was lying around in stdlib. 
However, it behaves differently on 1.9.2 vs 1.9.3....
I based my example in the patch on ruby-1.9.2-head:

  ruby git:(trunk)  ruby --version
ruby 1.9.2p204 (2011-05-12 revision 31519) [x86_64-linux]
  ruby git:(trunk)  ruby -rtracer example.rb
#0:internal:lib/rubygems/custom_require:38:Kernel:<: -
#0:example.rb:1::-: class A
#0:example.rb:1::C: class A
#0:example.rb:2::-:   def square(n)
#0:example.rb:5::E: end
#0:example.rb:7::-: A.new.square(5)
#0:example.rb:2:A:>:   def square(n)
#0:example.rb:3:A:-:     n*n
#0:example.rb:4:A:<:   end

Whereas 1.9.3dev doesn't seem to output anything?

  ruby git:(trunk)  ruby --version
ruby 1.9.3dev (2011-05-17 trunk 31604) [x86_64-linux]
  ruby git:(trunk)  ruby -rtracer example.rb
  ruby git:(trunk) 

Not sure if this is a bug or intended in 1.9.3dev...?

From what I could dig up it seems
1.9.2-head is displaying the correct behavior:

http://redmine.ruby-lang.org/issues/3843
http://redmine.ruby-lang.org/issues/3749
http://www.ruby-lang.org/ja/man/html/tracer.html
http://en.wikibooks.org/wiki/Ruby_Programming/Standard_Library/Tracer

thoughts?


-- 
http://redmine.ruby-lang.org