class Hash # It returns a hash without the specified keys. # # {:a => 1, "a" => 2, :b => 3}.except(:a, :b) # #=> {"a" => 2} # def except(*keys) dup.delete_if {|key, value| keys.include?(key)} end end