From: Pit Capitain Date: 2005-07-29T23:59:54+09:00 Subject: Re: Hooking Class Methods Trans schrieb: > To answer my own question: > > module PromoteSelf > def singleton_method_added( *args ) > p args > end > end > > module String::Format > class << self > include PromoteSelf > > def jumble( obj, x, y ) > p obj+x+y > end > end > end > > But I'll be honest with you. I find it odd. Why would'nt the later > work? It almost seems like it would have to be purposfully disallowed. > > Nonetheless, now that I've got this working I have something neat to > show ... Compare [ruby-core:4855]. Matz thinks this would make singleton classes more present in Ruby. Regards, Pit