On Jun 7, 11:30 ¨Βν¬ κϊαλιωΌκϊαλ®®®ΐναιμ®γονΎ χςοτεΊ
> I have this code to do timing tests:
>
> def tm(code); s=Time.now; eval code; Time.now-s end
>
> I use it like this:
>
> tm 'some code'
>
> I have this function that can take two inputs.
> When I  ¨Βυξ ιτ χιτθ κυστ οξιξπυμιλε τθισ>
> tm 'Pn(130)'
>
> I can time it with no problems.
>
> When I use a second input like this,
>
> tm 'Pn(130, mcps)'
>
> running in irb (1.8.6 and 1.9.0-1) it returns an
> unknown method or variable message for the
> second input.
>
> Is this a bug, or expected behavior?
> Can  ¨Β χοςλ αςουξδ τθισ>
> Thanks in advance.

I don't believe that is a bug.  At the time that 'eval' is running the
code, the variable 'mcps' is out of scope (assuming it is a
variable).  You may need to look into bindings:
http://onestepback.org/index.cgi/Tech/Ruby/RubyBindings.rdoc.

Let me know if I'm way off base.  I do hope that helps.

--
MilesZS