From: "trans. (T. Onoma)" Date: 2004-10-01T08:42:15+09:00 Subject: Re: ruby-dev summary 24298-24353 > "SASADA Koichi" schrieb im Newsbeitrag > news:20040929223720.2b31e9be%ko1@atdot.net... > > > Hi all, > > > > This is ruby-dev summary 24298-24353. > > > > > > [ruby-dev:24302] Invoke Proc object with any method name > > > > Nowake proposed that a Proc object should be invoked with > > any method name like that: > > > > m = Proc.new( :to_s ) { 'test1' } > > p m.to_s   # => 'test1' > > > > This scheme is enabled with following code: > > > > class MethodProc < Proc > >   def initialize( *method_name, &procedure ) > >     super( &procedure ) > >     m = Module.new > >     method_name.each do | i | > >       m.__send__( :define_method, i, &procedure ) > >     end > >     self.extend( m ) > >   end > > end > > > > He made a point that it is helphul that a Proc object can > > be handled as polymorphic. > > > > Matz amazed about this idea. This issue is still open. http://jakarta.apache.org/commons/sandbox/functor/ T.