From: Phrogz Date: 2009-11-19T01:20:30+09:00 Subject: Re: How to overide "include" method? On Nov 18, 8:42 am, Alexandre Mutel wrote: > I tried several way, but didn't found any to override the behavior of > the "include" method. # Class methods of classes inherit from instance methods of # the Class class before they inherit from instance methods of Module. # http://phrogz.net/RubyLibs/RubyMethodLookupFlow.png class Class def include(*args) p "hi!" super end end module Bar; end class Foo include Bar #=> "hi!" end p Foo.ancestors #=> [Foo, Bar, Object, Kernel]