From: pharrington Date: 2009-12-10T11:15:07+09:00 Subject: Re: help solving problem in ruby On Dec 9, 8:54 pm, 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 > -- > Posted viahttp://www.ruby-forum.com/. In Ruby one can reopen a class at anytime and "monkey patch" it to add new methods etc. Looks like you skipped the part in Programming Ruby where the Song class was initially defined.