From: Shashank Agarwal Date: 2008-08-29T02:12:30+09:00 Subject: Re: Newb question: Printing a class. Brian A. wrote: > This bit of code was given to me in the tutorial. However if I type > 'puts sandy.person' I get the following error message: > 'test_temp1.rb:43: undefined method `person' for # > (NoMethodError)' > This is because you are asking it to find the return value of method 'person', but such a method does not exist. With sandy.address, you asked for the return value of method 'address'. This basically was returning the object 'address' for sandy. To get the to_s method in person, just put - puts sandy That should work (not tested). -- Posted via http://www.ruby-forum.com/.