From: Jason Mayer Date: 2006-12-20T23:19:50+09:00 Subject: Re: Simple copy of attributes ------=_Part_14956_7585382.1166624388354 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 12/20/06, Trans wrote: > > > Jason Mayer wrote: > > I'm sorry for this question, but I'm a newbie and I just started reading > the > > Little Book of Ruby. On page 22 it says that "the to_s method is > defined > > for the Object class itself". If the Object class has no methods (as > your > > irb session shows), then what exactly is meant by the Little Book of > Ruby > > statement? > > That's a good example. Technically, #to_s is defined in Kernel not > Object. But since everyithing in Kernel is defined ultimately for > Object b/c Kernel is included into Object, then in a round about way > what the book is true. It would be better if it mentioned Kernel's > invovlement though. > > t. > > > Thanks, that clears it up for me. Doing p Kernel.instance_methods(false) shows me exactly what I wanted to see. Thanks again! ------=_Part_14956_7585382.1166624388354--