2007/7/31, ara.t.howard <ara.t.howard / gmail.com>:
> i was playing with this last night, thought some here might be
> interested:
>
>    http://drawohara.tumblr.com/post/7241442

Hi Ara, since I don't know the implementation of Rails'
alias_method_chain, I can't comment on which is better, so just a few
remarks concerning your code:

* Syntax: like ±Ơienne, I, too, don't like that it is necessary to
repeat the method name in both the #redefining call and the method
definition. Couldn't you just call #redefining without an argument and
look in the new module which methods have been defined there?

* Implementation: I haven't checked in detail, but I think you could
get problems with the class variable when there's a class hierarchy.

* Implementation: currently, the method chains are only used as a flag
whether to create the "initial" module or not. Do you plan to use it
for other things? Otherwise you don't need an array with all the
intermediate modules.

Btw. nice use of the BEGIN block!

Regards,
Pit