From: Alexandru Popescu Date: 2005-08-21T03:13:19+09:00 Subject: Re: Ruby beginner question #: Alexandru Popescu changed the world a bit at a time by saying on 8/20/2005 8:09 PM :# > #: chris changed the world a bit at a time by saying on 8/20/2005 7:51 PM :# >> > > I think you should write it: > > class Song > [....] > > def to_s > "Song: #{@name}--#{@artist} (#{@duration})" > end > end > > class KaraokeSong > [...] > def to_s > super + + " [#{@lyrics}]" > end > > end > > [...] > puts aSong.to_s > > :alex |.::the_mindstorm::.| > > definitely no double +, just one +. as it was already explained Song#to_s should return a string, while the initial Song#to_s is just printing one and returning nil. :alex |.::the_mindstorm::.|