From: "T. Onoma" Date: 2003-12-15T01:17:04+09:00 Subject: Re: append_features(mod) -- mod.kind_of? makes absolutely no sense On Sunday 14 December 2003 11:16 am, nobu.nokada@softhome.net wrote: > Hi, > > At Sun, 14 Dec 2003 16:45:41 +0900, > > T. Onoma wrote: > > class Module > > alias append_features_orig append_features > > def append_features(mod) > > p mod, mod.class > > p self # try this. > > > append_features_orig(mod) > > end > > end > > module MyModule > > def wow > > puts "You have to be kidding!" > > end > > end > > class Test > > include MyModule > > end > > t = Test.new > > t.wow Okay, that at least clarifies where MyModule went. How did it become self? In #include it is the argument. Let me guess: def include(mod) mod.append_features(self) end By the way, PickAxe (my Bible) doesn't explain this correctly. -- T.