From: ts Date: 2001-10-28T00:53:59+09:00 Subject: [ruby-talk:23630] Re: Whats wrong >>>>> "D" == Djm writes: D> class SongList D> def initialize D> @songs = Array.new D> end D> end ^^^ This line end the definition of the class SongList D> def append(aSong) D> @songs.push(aSong) D> self D> end D> end ^^^ now, ruby has a problem because it find `end' which match nothing D> def deleteFirst D> @songs.shift D> end D> def deleteLast D> @songs.pop D> end D> end ^^^ same here remove the first `end' which close the class SongList D> list = SongList.new D> list. D> append(Song.new('title1', 'artist1', 1)) ^ | a `.' is missing at the end of the line D> append(Song.new('title2', 'artist2', 2)). D> append(Song.new('title3', 'artist3', 3)). D> append(Song.new('title4', 'artist4', 4)) You can retrieve the examples (if you want download it) at http://www.pragmaticprogrammer.com/ruby/samples/index.html Guy Decoux