From: gwtmp01@... Date: 2007-01-15T01:58:45+09:00 Subject: Re: Question about Array's size instance method On Jan 14, 2007, at 9:23 AM, dblack@wobblini.net wrote: > I'll just add, in case it helps with future understanding of something > similar, that I don't think Ruby ever initializes an instance variable > for you, without your specifically doing it (or implicitly, in the > case of attr_*-generated methods). Call me pedantic, but I think it is important to point out that Dave's comment excludes Ruby's default initialization to nil for instance variables. p Object.new.instance_variable_get('@foo') # => nil When learning Ruby, it took me a little while before I absorbed the fact that nil behaves as an object as opposed to a special value (like C's NULL pointer) indicating the lack of a referenced object. Gary Wright