Issue #12352 has been updated by Yukihiro Matsumoto. Although I admit my mistake, I reject this for consistency. If I allow this syntax, it had to generate ``` ruby h = {1: 2} p h # => {:"1", 2} ``` and no one want this. Matz. ---------------------------------------- Feature #12352: New hash syntax broken for numeric keys https://bugs.ruby-lang.org/issues/12352#change-58653 * Author: Adriano Mitre * Status: Assigned * 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>