From: Tim Hunter Date: 2009-03-23T03:44:20+09:00 Subject: Re: Newbie needs help with first project Stefan Codrescu wrote: > def to_s > puts "Games: > #{@title}--#{@platform}--#{@genre}--#{@rating}--#{@published_by}--#{@developed_by}--#{@year}--#{@condition}" > end > end > > game1=Game.new("FireProReturns","Playstation_2","Sports","Teen", > "Good","Agetec_Inc.","2000","Very_Good") > game1.to_s > > > Is what I'm guessing you should have. > You can put both of the methods in the same class. > You forgot the 'puts' before the Games: in the to_s method No, Daniel had it right. A class's #to_s method is expected to _return_ a string, not print a string. If you want to print the string representation of a Game object, you would use game1 = Game.new(....) puts game1.to_s -- RMagick: http://rmagick.rubyforge.org/