Feature #4720

Added documentation for lib/tracer.rb

Added by rramsden (Richard Ramsden) about 9 years ago. Updated about 9 years ago.

Target version:


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: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:




Updated by drbrain (Eric Hodel) about 9 years ago

  • Category set to doc

Updated by drbrain (Eric Hodel) about 9 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r31618.
Richard, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

  • lib/tracer.rb: Improve documentation. Patch by Richard Ramsden. [Ruby 1.9 - Feature #4720]

Updated by drbrain (Eric Hodel) about 9 years ago

  • Target version changed from 1.9.2 to 1.9.3

I also do not see tracer working on 1.9.3dev revision 31612. Please file a separate issue for this.

PS: please wrap documentation at 80 columns and trim trailing whitespace

Also available in: Atom PDF