From: Sebastian Hungerecker Date: 2007-12-03T03:38:02+09:00 Subject: Re: Running -r in IRB John Sheahan wrote: > irb(main):011:0> other_wall=Wall.new(10) > => # > irb(main):012:0> > > I'm wondering why I don't get the program to run and count the 99 > bottles of beer starting with 10 in this case? Because nothing in your initialize method does that. Wall.new(10) creates a new Wall object and calls its initialize method with the paramter 10. Since your initialize method is defined as follows: def initialize(num_of_bottles) @bottles = num_of_bottles end Wall.new(10) will return a Wall object whose @bottles instance variable has been set to 10. It won't do anything more than that because it hasn't been told to do anything more. HTH, Sebastian -- NP: The Morningside - The Shadows Of The Past Jabber: sepp2k@jabber.org ICQ: 205544826