On Tue, 23 May 2006, Yukihiro Matsumoto wrote:

> Hi,
>
> In message "Re: initializing instance variables in a module"
>    on Tue, 23 May 2006 00:51:35 +0900, Jeff Rose <rosejn / gmail.com> writes:
>
> |Is there a standard or correct way to initialize @foo_the_stuff in this
> |example?
>
> This is not the answer, but I have been aware of this issue.  I'm
> planning to add method combination a la CLOS in the future to support
> this issue.  It is another option that adding a new hook like
> 'module_initialize' which is called at instantiation time for all
> modules.
>
> 							matz.

hi matz-

(rcr ahead)

the other day i realized that one could detect class creation using

   class Class
     def inherited
       ...
     end
   end

but that no such hook existed for class Module.  could one be added such as

   class Module
     def instantiated
       ...
     end
   end

to hook into rb_define_module/rb_define_module_under?


regards.

-a
-- 
be kind whenever possible... it is always possible.
- h.h. the 14th dali lama