[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Binding of caller in Ruby 1.9

Ken Bloom

4/10/2008 11:12:00 PM

Does anybody know of a way to get access in Ruby 1.9 to the binding of
the caller of the function that's currently executing?

--Ken

--
Ken (Chanoch) Bloom. PhD candidate. Linguistic Cognition Laboratory.
Department of Computer Science. Illinois Institute of Technology.
http://www.iit.edu...
1 Answer

Paul Brannan

4/11/2008 3:11:00 PM

0

On Fri, Apr 11, 2008 at 08:40:08AM +0900, Ken Bloom wrote:
> Does anybody know of a way to get access in Ruby 1.9 to the binding of
> the caller of the function that's currently executing?

Pass it in explicitly:

foo(arg1, arg2, binding)

Being able to get the binding of the caller prevents desirable
optimizations.

Paul