Actions
Bug #4259
closedSymbol syntactic sugar in Hashes does not work with quotes
Description
=begin
To reproduce the problem, try the following in irb:
hash = {Alabama: "AL"}
=> {:Alabama=>"AL"}
puts hash[:"Alabama"]
AL
=> nil
hash2 = {"Rhode Island": "RI"}
SyntaxError: (irb):3: syntax error, unexpected ':', expecting tASSOC
hash2 = {"Rhode Island": "RI"}
^
(irb):3: syntax error, unexpected '}', expecting $end
from /usr/local/bin/irb:12:in `'
hash2 = {:"Rhode Island" => "RI"}
=> {:"Rhode Island"=>"RI"}
=end
Actions
Like0
Like0Like0