title: Simple question about deleting an object from a Ruby array
body: <p>I have a Ruby (1.9.2) array which I need to remove an object from.</p>
  
  <pre><code>[object1, object2, object3]
  </code></pre>
  
  <p>At the moment I'm doing</p>
  
  <pre><code>array.delete_at(1)
  </code></pre>
  
  <p>which removes the object, but then there is an empty array spot at that index.</p>
  
  <pre><code>[object1, , object3]
  </code></pre>
  
  <p>How do I remove an object so that the array is resized so that there is no empty spot in the array?</p>
  
  <pre><code>[object1, object3]
  </code></pre>
  
  <p>Thanks for reading.</p>