title: method similar to array#pop for hash
body: <p>I have a hash of people keyed by job and sorted by salary:</p>
  
  <pre><code>person = Struct.new(:salary)
  
  people = {
    :butchers =&gt; [
      person.new(10),
      person.new(6),
      person.new(4)
    ],
    :bakers =&gt; [
      person.new(16),
      person.new(8),
      person.new(7)
    ],
    :candlestick_makers =&gt; [
      person.new(25),
      person.new(21),
      person.new(18)
    ]
  }
  </code></pre>
  
  <p>I want to remove the last x people of each job from their respective array and do something:  </p>
  
  <pre><code>def this_example_method
    people.each do |job, people|
      people.pop(number_for(job)).each do |person|
        #do something
      end
    end
  end
  </code></pre>
  
  <p>the 'do something' works okay, but <code>pop</code> removal doesn't.  After running <code>this_example_method</code>, the <code>people</code> hash <strong>should</strong> look this, but at the moment it's not changing:</p>
  
  <pre><code>people = {
    butchers = [
      &lt;butcher_1 salary:10&gt;
      &lt;butcher_2 salary:6&gt;
    ],
    bakers = [
      &lt;baker_1 salary:16&gt;
      &lt;baker_2 salary:8&gt;
    ],
    candlestick_makers = [
      &lt;candlestick_maker_1 salary:25&gt;
      &lt;candlestick_maker_2 salary:21&gt;
    ]
  }
  </code></pre>