title: Iterating over each element of an array, except the first one
body: <p>What is the idiomatic Ruby way to write this code?</p>
  
  <p>Given an array, I would like to iterate through each element of that array, but skip the first one. I want to do this without allocating a new array.</p>
  
  <p>Here are two ways I've come up with, but neither feels particularly elegant.</p>
  
  <p>This works but seems way too verbose:</p>
  
  <pre><code>arr.each_with_index do |elem, i|
    next if i.zero? # skip the first
    ...
  end
  </code></pre>
  
  <p>This works but allocates a new array:</p>
  
  <pre><code>arr[1..-1].each { ... }
  </code></pre>
  
  <p><em>Edit/clarification: I'd like to avoid allocating a second array. Originally I said I wanted to avoid "copying" the array, which was confusing.</em></p>