Project

General

Profile

Actions

Feature #4276

closed

Allow use of quotes in symbol syntactic sugar for hashes

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

Status:
Closed
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 4 (0 open4 closed)

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
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0