That is exactly what I was look for! Thank you very much.


On Jun 26, 2009, at 11:25 AM, Joel VanderWerf wrote:

> Martin Hess 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.
>
> obj = "something"
> method = :reverse
> obj.send method # faster than eval
>
> -- 
>      vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
>