Todd Benson
4/9/2009 2:29:00 PM
On Thu, Apr 9, 2009 at 9:18 AM, Hunt Jon <jona.hunt777@gmail.com> wrote:
> When I run:
>
> p {"foo" => 1, "bar" => 2, "baz" => 3 }
>
> I get an error.
>
> But when I run:
>
> x = {"foo" => 1, "bar" => 2, "baz" => 3 }
> p x
>
> There's no error.
>
> What's the difference between the two?
>
> John
p( {"foo" => 1, "bar" => 2, "baz" => 3} )
You need parentheses in the first case, I believe, so the that the
parser knows you are not trying to send a block to the method #p.
Todd