title: Is there a short way to write `{|x| x}`?
body: <p>We often shorten a block using the <code>&amp;</code> notation on a symbol like this:</p>
  
  <pre><code>some_array.group_by(&amp;:foo)
  </code></pre>
  
  <p>Is there a similar way to shorten expressions like <code>{|x| x}</code>?</p>
  
  <pre><code>some_array.group_by{|x| x}
  </code></pre>
  
  <p>If there were a method <code>Object#self</code> that returns <code>self</code>, then we can do</p>
  
  <pre><code>some_array.group_by(&amp;:self)
  </code></pre>
  
  <p>but unfortunately, there is no such method. In terms of the number of characters, it may be longer, but readability improves.</p>