Project

General

Profile

Actions

Feature #4720

closed

Added documentation for lib/tracer.rb

Added by rramsden (Richard Ramsden) over 13 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
[ruby-core:36261]

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


Files

Actions #1

Updated by drbrain (Eric Hodel) over 13 years ago

  • Category set to doc
Actions #2

Updated by drbrain (Eric Hodel) over 13 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]
Actions #3

Updated by drbrain (Eric Hodel) over 13 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

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0