Flowdock
method

dup

Importance_1
Ruby on Rails latest stable (v4.2.1) - 0 notes - Class: ActiveSupport::HashWithIndifferentAccess
dup() public

Returns a shallow copy of the hash.

hash = ActiveSupport::HashWithIndifferentAccess.new({ a: { b: 'b' } })
dup  = hash.dup
dup[:a][:c] = 'c'

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