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

class Hash

  # Minor modification to Ruby's Hash#delete method
  # allowing it to take multiple keys.
  #
  #   hsh = { :a => 1, :b => 2 }
  #   hsh.delete_values(1)
  #   hsh  #=> { :b => 2 }
  #

  def delete_values(*values)
    keys.map{|key| delete(key) if values.include?(fetch(key)) }
  end

end

