bparanj / gmail.com wrote:
> When I run the following in the irb session, I am getting an error.
> Any ideas why? TIA.
> irb(main):036:0> { :a => 1, :b => 4 }
> => {:a=>1, :b=>4}
> irb(main):037:0> { :x 2, :y 6 }
> SyntaxError: (irb):37: syntax error, unexpected tINTEGER, expecting
> tASSOC
> { :x 2, :y 6 }
>       ^

I think you're confusing symbol hash keys with 1.9's named arguments:

foo(:a => 1, :b => 2) # symbol hash keys
foo(a:1, b:2)  # 1.9 named arguments


-- 
RMagick: http://rmagick.rubyforge.org/
RMagick 2: http://rmagick.rubyforge.org/rmagick2.html