与Ruby 1.9.2新海因子有过争执。 在1.9.2中,我怎么能把任何目标作为关键?
在1.8.7亿英亩的矿区中,有:
a="b"
{"a" => "some",a => "another value",:a => "3rd value"}
但是,在1.9.2和1.92段中, 我们可以 t(或者如果我错了吗?)”
1.9.2h:
{a: "some"} => {:a=>"s"} #it convert to old hash format
......
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"}