From: Jean-Hugues ROBERT Date: 2002-05-27T04:06:03+09:00 Subject: Re: Proc.binding(), binding.self(); RCR ? Hello, At 00:26 27/05/2002 +0900, you wrote: >Hi, > >At Mon, 27 May 2002 00:00:05 +0900, >Jean-Hugues ROBERT wrote: > > Is there a way to know about the binding of a Proc. I need something > > like a_proc.binding().self(): > > > > class Scheduler > > def post( &block); enqueue( block); end > > def process_loop() > > while block = dequeue() > > res = block.call() > eval("self", block).signal(res) > > end > > end > > end > >-- >Nobu Nakada Hmm... I saw no mention about that in O'Reilly Ruby in a Nutshell. According to it the second parameter of eval should be a binding... Does it means that I can use a Proc where ever a Binding is needed ? That would make sense I guess (Yet Proc#binding() would make sense too, from a pure oo perspective). Yours, Jean-Hugues ------------------------------------------------------------------------- Web: http://hdl.handle.net/1030.37/1.1 Phone: +33 (0) 4 92 27 74 17