Issue #12352 has been updated by Yukihiro Matsumoto.

Status changed from Assigned to Rejected

----------------------------------------
Feature #12352: New hash syntax broken for numeric keys
https://bugs.ruby-lang.org/issues/12352#change-58654

* Author: Adriano Mitre
* Status: Rejected
* Priority: Normal
* Assignee: Yukihiro Matsumoto
----------------------------------------
[[Matz himself showed in RubyConf 2015 the following example]](https://www.youtube.com/watch?v=LE0g2TUsJ4U&t=13m04s):

~~~
h = { 1: 2, 2: 4, 3: 6 }
~~~

Which gives

~~~
SyntaxError: unexpected ':', expecting =>
h = { 1: 2, 2: 4, 3: 6 }
        ^

~~~

but which should give identical results to

~~~
>> h = { 1 => 2, 2 => 4, 3 => 6 }
=> {1=>2, 2=>4, 3=>6}
~~~




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

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>