Sha256: 0e6b2050c8b1a492882824724f93491788fa519457e5411fcc158322e92557ad
Contents?: true
Size: 290 Bytes
Versions: 25
Compression:
Stored size: 290 Bytes
Contents
class Hash def deep_merge!(other) self.merge!(other) do |_key, v_self, v_other| if v_self.is_a?(Hash) && v_other.is_a?(Hash) v_self.deep_merge(v_other) else v_other end end end def deep_merge(other) self.dup.deep_merge!(other) end end
Version data entries
25 entries across 25 versions & 1 rubygems