From: "Brian A." Date: 2008-08-29T02:24:03+09:00 Subject: Re: Newb question: Printing a class. Shashank Agarwal & Matthias Reitinger wrote: > > puts sandy > Thank you both that did work, but opened a new issue for me. When I change the def to_s within the Person class to this (adding the @address): ======================================================================== def to_s @first_name + " " + @last_name + "\n" + \ @email + "\n" @address end ======================================================================== I get this "#", is this because the Person class makes reference to the Address class, and its the address class has its own to_s that prints? Should I move the @street + "\n" + \, ...etc to the Person class from the Address class? If I change the def a little to this: ======================================================================== def to_s @first_name + " " + @last_name + "\n" + \ @email + "\n" @address + "\n" end ======================================================================== I get a different error message: "test_temp1.rb:25:in `to_s': undefined method `+' for # (NoMethodError) from test_temp1.rb:41:in `puts' from test_temp1.rb:41" Thanks! -- Posted via http://www.ruby-forum.com/.