From: Chad Perrin Date: 2012-01-25T13:32:45+09:00 Subject: Re: A little assistance please :) On Wed, Jan 25, 2012 at 10:41:10AM +0900, Paet Worlds II wrote: > Hilco Wijbenga wrote in post #1042399: > > > > The problem is the "self." in the class names. > > What exactly is wrong with the self. ?o,o The "self" is a way to refer to the current object context. For instance, in an irb session: $ irb >> self.class => Object Because self already has meaning in Ruby, when you try to define a class like this: class self.Startup . . . Ruby is trying to call a Startup method on the Object object (no, that repetition wasn't accidental -- there's an object called Object) and use the return value of that method as the name of the class you're trying to define. Of course, the return value of it is nil, because there is no Startup method for the Object object, so to the interpreter it looks like you're doing this: class Because it's difficult to see there, I'll explain that there's a space after "class" followed by a newline, which is why Ruby is complaining that there's an unexpected "\n" (the escape character for a newline). Ruby expects a class name to follow the "class" keyword. That's what's wrong with the "self." there. -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]