Issue #4276 has been updated by Andrew M.


Yukihiro Matsumoto wrote:
> I am not against the idea, but I want to make sure that key will be symbol,

Yes, I believe that was the intention. E.g.

```
# Currently, Hashes have syntactic sugar which allows:
{:key => "Value"} == {key: "Value"} #=> true

# This feature request is to allow:
{:"some key" => "Value"} == {"some key": "Value"} #=> true
```

----------------------------------------
Feature #4276: Allow use of quotes in symbol syntactic sugar for hashes
https://bugs.ruby-lang.org/issues/4276#change-48289

* Author: Tyler Benster
* Status: Feedback
* Priority: Low
* Assignee: Yukihiro Matsumoto
* Category: core
* Target version: next minor
----------------------------------------
Current syntactic sugar allows this:

    hash = {Alabama: "AL"}

This feature request is to also allow symbols delimited by quotes (and thus able to contain a whitespace) to use an equivalent syntactic sugar:

    hash2 = {"Rhode Island": "RI"}




-- 
https://bugs.ruby-lang.org/