From: pjb@... (Pascal J. Bourguignon) Date: 2009-01-14T08:39:10+09:00 Subject: Re: Very rank beginner. "Ropebender" writes: > The tutorial was on http://www.ruby-lang.org/ > > It was the tutorial in the sidebar "Ruby in 20 minutes" > > Worked fine until I tried to define a class Greeter. Instructions said to > initialize Greeter with (name = "World") and then define an object g to set > the @name. It didn't woork like the tutorial said. > > => nil > > irb(main):033:0> class Greeter > > irb(main):034:1> def initialize(name = "World") > > irb(main):035:2> end > > Looks like the initialize never worked. Any suggestions? Indeed. def initialize(name = "World") doesn't initialize anything. It just says that if you don't give any argument to new, then it should do as if you passwed "World", and set the parameter accordingly. You didn't do anything with this parameter. Try to add a @name = name somewhere... -- __Pascal Bourguignon__