title: All but last element of Ruby array
body: <p>Let's say I have a Ruby array</p>
  
  <pre><code>a = [1, 2, 3, 4]
  </code></pre>
  
  <p>If I want all but the first item, I can write <code>a.drop(1)</code>, which is great. If I want all but the <em>last</em> item, though, I can only think of this way</p>
  
  <pre><code>a[0..-2]   # or
  a[0...-1]
  </code></pre>
  
  <p>but neither of these seem as clean as using <code>drop</code>. Any other built-in ways I'm missing?</p>