From: ts Date: 2003-03-26T18:54:58+09:00 Subject: Re: question about include and modules >>>>> "M" == Mauricio =?iso-8859-1?Q?Fern=E1ndez?= writes: M> Is this because array.c uses rb_include_module instead of M> rb_mod_include? No, the problem is with the internal of ruby. When you add a module in another module, you must re-call include to force ruby to update the `path' of the class. When you write class A include B end The `path' for A is A ==> [B] ==> Object ==> [Kernel] where [B] is a proxy class which refer to the module B Now with module B include C end class A include B end ruby will do A ==> [B] ==> [C] ==> Object ==> [Kernel] i.e. the path is modified when ruby *make* the include If you include another module in B, ruby will not update the path for A (it has lost the information that B was included in A) Guy Decoux