From: "Michael W. Ryder" <_mwryder55@...> Date: 2009-12-10T11:15:08+09:00 Subject: Re: help solving problem in ruby Govinda Khanal wrote: > i am a beginner and having problem in linux with this code: > > class Song > def to_s > "Song: #@name--#@artist (#@duration)" > end > end > song = Song.new("Bicylops", "Fleck", "2.60") > song.to_s > > > > > => the output looks like this: > > > a.rb:6:in `initialize': wrong number of arguments (3 for 0) > (ArgumentError) > from a.rb:6:in `new' > from a.rb:6 If you looked earlier in the chapter you would have seen an initialize method that needs to be part of the Song class.