title: Ruby's "each" methods not iterating over all items in an array?
body: <p>I'm trying out the following code:</p>
  
  <pre><code>a = [1,2,3,4]  
  a.each do  
    puts "Removing #{a.last}"  
    a.pop  
  end
  </code></pre>
  
  <p>but instead of getting all four numbers popped I only get the first 3. Indeed, doing something like puts a.length returns 1 and puts-ing it shows the element "1" is still there.</p>
  
  <p>How do I need to use the method correctly?
  (I'm using Ruby 2.0).</p>