From: Pit Capitain Date: 2005-07-20T05:17:24+09:00 Subject: Re: Instance Eval of a Proc Phrogz schrieb: > I know that Ruby doesn't currently have first-class functions, but I'm > trying to determine if there's a way to do the equivalent of the above. As has been shown in the original post, Ruby's lambdas are what you call first-class functions. When called via instance_eval, they are executed within a new self and have access to self's instance variables and methods. > Is there any way to invoke a method defined on one class within the > scope of an instance of any other class? It seems that a method, even if unbound or converted to a proc, always keeps a connection to its class. I think the only way I've seen yet to achieve what you want was using the evil library. Regards, Pit