From: "David A. Black" Date: 2005-09-10T04:42:44+09:00 Subject: Re: method_added for class methods Hi -- On Sat, 10 Sep 2005, Trans wrote: > class X > class << self > def method_added(*args) > p args > end > def singletin_method_added(*args) s/tin/ton/ :-) > p args > end > end > end I believe that only the singleton_method_added actually does anything. I guess that's because the only methods you can add to this class are singletons, and that gets priority. At least, when I tried method_added, I couldn't get any output. > Don't ask me to explain it --it's mind numbing. Like so many things, it comes down to: * objects can have singleton methods * singleton methods are stored in the object's singleton class * classes are objects It's so lovely, don't you think? :-) David -- David A. Black dblack@wobblini.net