From: Alexandru Popescu Date: 2006-06-29T02:53:44+09:00 Subject: Re: eigenclass not extensible ? IMO because Cls is already having its particular singleton class (when you defined the somemethod). (but I may be completely wrong). ./alex -- .w( the_mindstorm )p. --- (http://themindstorms.blogspot.com) On 6/28/06, Jonas Pfenniger wrote: > ... in the particular case where the method already exists. > > == Example > > class Cls; end > class Cls2; end > > def Cls.somemethod > "defined in Cls" > end > > Cls.somemethod #=> "defined in Cls" > > module Mod > def somemethod > "defined in Mod" > end > end > > Cls.extend Mod > Cls2.extend Mod > > Cls.somemethod #=> "defined in Cls" > Cls2.somemethod #=> "defined in Mod" > > > Why doesn't Cls.somemethod gets overrided ? > > -- > Cheers, > zimbatm > > http://zimbatm.oree.ch > >