=begin rdoc Hash extentions =end class Hash def safe_merge(other_hash) merge(other_hash.delete_if {|k,v| has_key?(k) }) end def safe_merge!(other_hash) merge!(other_hash.delete_if {|k,v| has_key?(k) }) end end