Sha256: 271a385f4bb4e937b253441f1811fc65cc682c0a5964e5ef108658a0f1d0f782
Contents?: true
Size: 261 Bytes
Versions: 6
Compression:
Stored size: 261 Bytes
Contents
class Hash def deep_merge(other) dup.deep_merge!(other) end def deep_merge!(other) other.each_pair do |key, val| tval = self[key] self[key] = tval.is_a?(Hash) && val.is_a?(Hash) ? tval.deep_merge(val) : val end self end end
Version data entries
6 entries across 6 versions & 1 rubygems