From: Phillip Hutchings Date: 2006-07-26T05:32:00+09:00 Subject: Re: "Self" confusion See comments in the code. class Yoghurt def self.a # Here self is the Yoghurt class. This defines a method on the Yoghurt class "yoghurt self" end def Yoghurt.a # This does exactly the same as self.a, just another way of doing it. # This overwrites the previous version, which is quite legit in Ruby "yoghurt" end p Yoghurt.a p self.a end def self.a # This defines a on self, which is an instance of Object. "object self" end def Object.a # This defines a on the Object class "object" end p Object.a p self. And the output I'd expect is: > "yoghurt" > "yoghurt" > "object" > "object self" > > -- Phillip Hutchings http://www.sitharus.com/