From: "trans. (T. Onoma)" Date: 2004-10-01T11:23:19+09:00 Subject: Re: ruby-dev summary 24298-24353 On Thursday 30 September 2004 09:07 pm, Yukihiro Matsumoto wrote: > Hi, > > In message "Re: ruby-dev summary 24298-24353" > > on Fri, 1 Oct 2004 09:52:34 +0900, "trans. (T. Onoma)" writes: > |> Hmm, "fanctor". I like the name. > | > |Is a new class required? I think, Proc could add this feature and remain > |backward compatible. > > I just said I liked the name. ;-) > I'm not yet sure if we need a new class. > > matz. In that case you might want this: # functor.rb class Functor def initialize(&func) @func = func end def method_missing(op, *args) @func.call(op, *args) end end Shhh... Don't tell anyone. It's my favorite secret weapon ;) T. -- ( o _ カラチ // trans. / \ transami@runbox.com I don't give a damn for a man that can only spell a word one way. -Mark Twain