From: ara.t.howard@... Date: 2006-05-23T22:15:52+09:00 Subject: Re: module creation hook method (Re: [OT] Re: initializing instance variables in a module) On Tue, 23 May 2006, Yukihiro Matsumoto wrote: > Thank you for the example. I am still not sure this is a right tool for the > right purpose, but I do understand what you wanted to do in the code. > Hidetoshi NAGAI is proposing load_to(file, module) method to do the thing > you wanted. In my opinion, this is better way to implement. indeed. that's just one example though, a module/class creation hook could be used in all sorts of interesting ways: class Module def defined STDERR.puts "#{ self } defined @ #{ caller.first }" end end for instance. > | or perhaps #defined > | or perhaps #created > > Maybe. Much better than inherited. Or maybe invoking initialize at > the module creation is even better. (after you reading your other note) yes. #defined would be really nice for both classes and modules - called via rb_define_xxx. cheers. -a -- be kind whenever possible... it is always possible. - h.h. the 14th dali lama