From: Pat Maddox Date: 2006-11-25T20:08:02+09:00 Subject: Calling methods from within singleton class I'd like some clarification on the following simple examples. class Foo self end # Foo class << Foo self end # # No surprise there. In the first case I'm defining the class and returning self, which of course is the class, and in the second it's the singleton class. class << Foo def foo "foo" end end Now I can call Foo.foo as expected. It could have just as easily been def Foo.foo "foo" end However, I can't do class << Foo foo end to call it. It results in "NameError: undefined local variable or method `foo' for #". What's the difference? Pat