Sha256: b6b843e986d4f1a23bc51b45b68bd46929b78fa7f5ba30ff93d4f0638041e4f6
Contents?: true
Size: 244 Bytes
Versions: 153
Compression:
Stored size: 244 Bytes
Contents
class Hash # Returns a deep copy of hash. def deep_dup duplicate = self.dup duplicate.each_pair do |k,v| tv = duplicate[k] duplicate[k] = tv.is_a?(Hash) && v.is_a?(Hash) ? tv.deep_dup : v end duplicate end end
Version data entries
153 entries across 140 versions & 7 rubygems