Flowdock
method

deep_dup

Importance_1
Ruby on Rails latest stable (v4.0.2) - 0 notes - Class: Hash
deep_dup() public

Returns a deep copy of hash.

hash = { a: { b: 'b' } }
dup  = hash.deep_dup
dup[:a][:c] = 'c'

hash[:a][:c] #=> nil
dup[:a][:c]  #=> "c"
Show source
Register or log in to add new notes.