Gregory Brown
12/7/2005 11:55:00 PM
On 12/7/05, Joe Van Dyk <joevandyk@gmail.com> wrote:
> On 12/7/05, Joe Van Dyk <joevandyk@gmail.com> wrote:
> > I'm spending an hour or two today going through Ruby's standard
> > library, seeing what's in there.
> >
> > What the hell is WeakRef used for? How is that useful?
>
> Also, there's hardly any documentation for Tracer. Had to look it up
> in Pickaxe2.
A few seconds in IRb got me this:
[olympic]$ irb
irb(main):001:0> require "tracer"
=> true
irb(main):002:0> Tracer.on { "Foo".to_a.reverse }
#0:(irb):2:Object:-: -
#0:(irb):2:Enumerable:>: -
#0:(irb):2:String:>: -
#0:(irb):2:String:<: -
#0:(irb):2:Enumerable:<: -
#0:(irb):2:Array:>: -
#0:(irb):2:Array:<: -
=> ["Foo"]
irb(main):003:0> Tracer.on { (1..20).to_a.reverse }
#0:(irb):3:Object:-: -
#0:(irb):3:Object:-: -
#0:(irb):3:Enumerable:>: -
#0:(irb):3:Range:>: -
#0:(irb):3:Range:<: -
#0:(irb):3:Enumerable:<: -
#0:(irb):3:Array:>: -
#0:(irb):3:Array:<: -
=> [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
irb(main):004:0> Tracer.on { @a = 3 }
#0:(irb):4:Object:-: -
=> 3
irb(main):005:0> Tracer.on { @a }
#0:(irb):5:Object:-: -
=> 3
This looks interesting. If I document this class where should I send
my documentation?