But apparently this doesn't work in practice, scratch that, hehe.

On Tue, Dec 20, 2005 at 06:58:33AM +0900, Jeffrey Moss wrote:
> You could also do something like this:
> 
> a=proc{@av=111} #something different
> a.bind(b).call
> 
> -Jeff
> 
> On Tue, Dec 20, 2005 at 05:57:47AM +0900, hochherz wrote:
> > is there a way to use a proc like a method?
> > 
> > like:
> > 
> > class A
> >   def initialize
> >     @av=10;
> >   end
> >   def do(mproc)
> >     mproc.call();
> >   end
> >   def rt()
> >     @av;
> >   end
> > end
> > 
> > 
> > a=proc{@av=111} #something different
> > b=A.new
> > b.do(a)
> > b.rt #return -> 111
> > 
> > is it possible by makeing subclass of proc to do this?
> > 
>