From: Donald Luo Date: 2006-05-27T17:06:57+09:00 Subject: Re: Extend self? Really thanks to the quick response, but it seems that the two ways of definitions are not really equivalent. Just did an experiment. If I say module A def self.a p 'a' end end class C include A end > C.a NoMethodError: undefined method `a' for C:Class > c = C.new > c.a NoMethodError: undefined method `a' for # While if I changed the definition of module A to module A extend self def a p 'a' end end ... > C.a NoMethodError: undefined method `a' for C:Class > c = C.new > c.a "a" Anyone can explain this? Cheers, Donald -- Posted via http://www.ruby-forum.com/.