class Hashie::Mash
def deep_update(other_hash, &blk)
Recursively merges this mash with the passed
def deep_update(other_hash, &blk) other_hash.each_pair do |k, v| key = convert_key(k) if regular_reader(key).is_a?(Mash) && v.is_a?(::Hash) custom_reader(key).deep_update(v, &blk) else value = convert_value(v, true) value = convert_value(blk.call(key, self[k], value), true) if blk && self.key?(k) custom_writer(key, value, false) end end self end