title: Why can't I use an integer as a key using the new Ruby 1.9.2 hash syntax?
body: <p>The new hash syntax in Ruby 1.9.2 means that I can do the following:</p>
  
  <pre><code>my_hash = {a: 1, b: 2, c: 3}
  </code></pre>
  
  <p>... which is equivalent to:</p>
  
  <pre><code>my_hash = {:a =&gt; 1, :b =&gt; 2, :c =&gt; 3}
  </code></pre>
  
  <p>Okay, so using the old syntax it's possible to do this (first key is an integer):</p>
  
  <pre><code>my_hash = {1 =&gt; 1, :b =&gt; 2, :c =&gt; 3}
  </code></pre>
  
  <p>And I've found it's even possible to mix the new and the old syntax like this:</p>
  
  <pre><code>my_hash = {1 =&gt; 1, b: 2, c: 3}
  </code></pre>
  
  <p>So, if we invoke the 'principle of least surprise', one would expect that the following would be legal:</p>
  
  <pre><code>my_hash = {1: 1, b: 2, c: 3}
  </code></pre>
  
  <p>... but it isn't. It generates a syntax error:</p>
  
  <pre><code>SyntaxError: (irb):40: syntax error, unexpected '='
  my_hash =  = {1: 1, b: 2, c: 3}
  </code></pre>
  
  <p>Can anybody explain if this is this a limitation of the parser, or are there very good reasons why this isn't possible, or allowed?</p>