#--
# Credit goes to Daniel Schierbeck
#++

class Hash

  # Minor modification to Ruby's Hash#delete method
  # allowing it to take multiple keys.
  #
  # This works niely with hahs#[] and Hash#[]= facets.
  #
  #    hsh[:a, :b, :c] = 1, 2, 3
  #    
  #    a, b, c = hsh.delete_values_at(:a, :b, :c)
  #    
  #    [a, b, c]  #=> [1, 2, 3]
  #    hsh        #=> {}
  #
  def delete_values_at(*keys, &block)
    keys.map{|key| delete(key, &block) }
  end

end

