From: Alex Stahl Date: 2010-07-12T05:29:20+09:00 Subject: Re: How to pass a hash as a param to a method called through eval? Thanks, but... tried that already and it fails without even calling the method: "...undefined method `com' for nil:NilClass (NoMethodError)" So I tried that w/ single quotes too: eval("#{call['action']}('#{call['params']}')") and that works, but still passes the params as a string, not a hash. :( -Alex On Sun, 2010-07-11 at 15:18 -0500, Ammar Ali wrote: > On Sun, Jul 11, 2010 at 10:57 PM, Alex Stahl wrote: > > > How can I pass it > > so that it remains a hash, and retains its structure for key/val reading > > in the receiver? > > > > Thanks, > > Alex > > > > > Adding parentheses around #{call['params']} should do it: > > eval("#{call['action']}(#{call['params']})") > > Ammar