Project

General

Profile

Feature #4276

Allow use of quotes in symbol syntactic sugar for hashes

Added by tbenst (Tyler Benster) almost 10 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Target version:
[ruby-core:34453]

Description

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"}

Related issues

Related to Ruby master - Feature #4801: Shorthand Hash Syntax for StringsRejectednobu (Nobuyoshi Nakada)05/30/2011Actions
Related to Ruby master - Bug #10653: do-end block in ternary operator is syntax error Closedmatz (Yukihiro Matsumoto)Actions
Has duplicate Ruby master - Feature #4935: Quoted Label Form for 1.9 HashesClosedmatz (Yukihiro Matsumoto)06/27/2011Actions
Has duplicate Ruby master - Feature #9047: Alternate hash key syntax for symbolsClosedmatz (Yukihiro Matsumoto)10/24/2013Actions

Also available in: Atom PDF