There is a weird issue with Ruby 1.9.2's new hash syntax. How can I put any Object as key in hash in 1.9.2?
in 1.8.7 hash it works:
a="b"
{"a" => "some",a => "another value",:a => "3rd value"}
But in 1.9.2 > We can't (or how can we if I'm wrong?")
1.9.2 hash:
{a: "some"} => {:a=>"s"} #it convert to old hash format
but
a="a"
{a: "..."} # This doesn't work
{"a": "some value"} => syntax error, unexpected '}', expecting $end
from /home/naveed/.rvm/rubies/ruby-1.9.2-p290/bin/irb:16:in `<main>'
{1: "s"} =>
SyntaxError: (irb):11: syntax error, unexpected ':', expecting tASSOC {1: "s"}