Project

General

Profile

Actions

Feature #11104

closed

ES6-like hash literals

Added by shugo (Shugo Maeda) almost 9 years ago. Updated almost 9 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-dev:48948]

Description

Why not support ECMAScript6-like hash literals?

For example,

{x, y}

is equivalent to:

{x: x, y: y}

For convenience, the prefix of global, instance, and class variables should be removed from the key name as follows:

a = 1
B = 2
$c = 3
@d = 4
@@e = 5
p({a, B, $c, @d, @@e, f: 6})
#=> {:a=>1, :B=>2, :c=>3, :d=>4, :e=>5, :f=>6}

Files


Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #11105: ES6-like hash literalsRejectedActions

Updated by shugo (Shugo Maeda) almost 9 years ago

  • Status changed from Open to Rejected

すみません、ruby-devになってしまったので出しなおします。

Actions #2

Updated by znz (Kazuhiro NISHIYAMA) about 7 years ago

Actions

Also available in: Atom PDF

Like0
Like0Like0