On 7/31/07, ara.t.howard <ara.t.howard / gmail.com> wrote: > > i was playing with this last night, thought some here might be > interested: > > http://drawohara.tumblr.com/post/7241442 > > cheers. > > a @ http://drawohara.com/ As Etienne and Pit pointed it out (guys are you using 1.9 and pointing fingers at us ;)?) the &blk sntax in block is really missing. This is a big issue here if method_chain.empty? m = Module.new do class_variable_set "@@#{ method }", this.module_eval{ instance_method method } module_eval "def #{ method }(*a, &b) @@#{ method }.bind(self).call(*a, &b) end" end remove_method method include m end As it is soo easy to have a class with @@#{method} in your class :( I do not see any solution, if only we could use closures with a define_method m do |*args,&blk| I know I am not DROP here :( BTW I would write def method_chains @method_chains ||= Hash.new end Cheers Robert P.S. Nice work :) -- [...] as simple as possible, but no simpler. -- Attributed to Albert Einstein