From: Yukihiro Matsumoto Date: 2005-05-07T16:27:38+09:00 Subject: Re: Method hooks in singleton classes Hi, In message "Re: Method hooks in singleton classes" on Fri, 6 May 2005 17:01:59 +0900, Pit Capitain writes: |currently the hooks method_added, method_removed, method_undefined are |*not* sent to singleton_classes. Instead, the corresponding singleton |method hooks are sent to the "attached" instance. |Is there any chance to always execute the else clause, as in: In that case, we have to decide to make "mataclass" in the language specification. See [ruby-talk:139309]. |The reason I'm asking: in a library I'm writing I'd like to be able to |catch *every* method redefinition for a given object. I'm not sure it's the solution. We sometimes want to avoid redefinition. Something like "around" method in CLOS might help. matz.