On Aug 20, 2005, at 10:46 AM, Alucard wrote:
> Hello
>
> I am very new to Ruby and currently install Ruby 1.82.15
>
> My question, what's wrong with the following code?
>
> class Song
>     def initialize(name, artist, duration)
>         @name = name
>         @artist = artist
>         @duration = duration
>     end
>
>     def to_s
>         puts "Song: #{@name}--#{@artist} (#{@duration})"

Omit the "puts": you want to return the string, not print it!

Josh