Feature #4720

Added documentation for lib/tracer.rb

Added by Richard Ramsden almost 3 years ago. Updated almost 3 years ago.

[ruby-core:36261]
Status:Closed
Priority:Normal
Assignee:Eric Hodel
Category:doc
Target version:1.9.3

Description

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) [x8664-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?

0001-Added-documentation-for-lib-tracer.rb.patch Magnifier (6.41 KB) Richard Ramsden, 05/17/2011 04:23 PM

Associated revisions

Revision 31618
Added by Eric Hodel almost 3 years ago

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

History

#1 Updated by Eric Hodel almost 3 years ago

  • Category set to doc

#2 Updated by Eric Hodel almost 3 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]

#3 Updated by Eric Hodel almost 3 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