From: Jeff Rohrer Date: 2006-09-04T02:48:46+09:00 Subject: Re: Already stalled in Pick Axe book - could use some help > Try and just enter the above class definition either in > irb or the file (and #load it in irb), but not both and > see if that helps. > >> Got it. Thanks! That works, now I can move on: C:\>irb irb(main):001:0> class Song irb(main):002:1> def initialize(name, artist, duration) irb(main):003:2> @name = name irb(main):004:2> @artist = artist irb(main):005:2> @duration = duration irb(main):006:2> end irb(main):007:1> def to_s irb(main):008:2> "Song: #@name--#@artist (#@duration)" irb(main):009:2> end irb(main):011:0> song = Song.new("Bicyclops", "Fleck", 260) => # irb(main):012:0> song.to_s => "Song: Bicyclops--Fleck (260)" -- Posted via http://www.ruby-forum.com/.