That works, but what if I want to store the method reference for later  
use?

On Jun 26, 2009, at 11:15 AM, Alex wrote:

> On Fri, Jun 26, 2009 at 2:03 PM, Martin Hess <martinhess / me.com>  
> wrote:
>
>> How do you pass a method reference and call it on a particular  
>> object? I
>> know I can pass it as a string and call eval, but I'm trying to  
>> avoid that
>> performance hit.
>>
>>
> You could use a proc/lambda, and pass it just like any other object:
> foo = lambda do
>  puts "word."
> end
>
> def test(bar)
>  bar.call
> end
>
> test(foo)
>
>
> Alex