@private
 Recursively merges this hash with another hash. All nested hashes are forced
 to be `Configoro::Hash` instances.

 @param [::Hash] other_hash The hash to merge into this one.
 @return [Configoro::Hash] This object.
169813
def deep_merge!(other_hash)
      other_hash.each_pair do |k, v|
        tv      = self[k]
        self[k] = if v.kind_of?(::Hash) then
                    if tv.kind_of?(::Hash) then
                      Configoro::Hash.new(tv).deep_merge!(v)
                    else
                      Configoro::Hash.new(v)
                    end
                  else
                    v
                  end
      end
      self
    end
965852
def flatten_nested_keys(body)
      options = {}
      body.each do |key, value|
        next unless value.is_a?(Hash)
        value = flatten_nested_keys(value.dup)
        value.each do |nested_key, nested_value|
          options["#{key}/#{nested_key}"] = nested_value
        end
        body.delete(key)
      end
      body.merge(options)
    end
715398
def merge(other)
      self.class.new.tap do |result|
        result.merge!(self)
        result.merge!(other)
      end
    end
982381
def merge(self, other):
        
        if not isinstance(other, NameVariants):
            raise TypeError("NameVariants isinstance can be merge with"
                            "other isinstance of the same class")
        for key in self.variants:
            self.variants[key] = self.variants[key] or other.variants[key]

        return self
289519
def smart_merge(parent, child)
      parent.merge(child) do |_key, old, new|
        case old
        when Hash
          smart_merge(old, new)
        else
          new
        end
      end
    end
363991
def merge_hash(a, b):
    '''  '''

    # and iterate over b keys
    for k, v in b.iteritems():
        if k in a and isinstance(a[k], dict):
            # if this key is a hash and exists in a
            # we recursively call ourselves with 
            # the key value of b
            a[k] = merge_hash(a[k], v)
        else:
            # k is not in a, no need to merge b, we just deecopy
            # or k is not a dictionnary, no need to merge b either, we just deecopy it
            a[k] = v
    # finally, return the resulting hash when we're done iterating keys
    return a
1358915
public LongsSketch merge(final LongsSketch other) {
    if (other == null) { return this; }
    if (other.isEmpty()) { return this; }

    final long streamWt = streamWeight + other.streamWeight; //capture before merge

    final ReversePurgeLongHashMap.Iterator iter = other.hashMap.iterator();
    while (iter.next()) { //this may add to offset during rebuilds
      this.update(iter.getKey(), iter.getValue());
    }
    offset += other.offset;
    streamWeight = streamWt; //corrected streamWeight
    return this;
  }
1125820
def to_hash
      _new_hash = ::Hash.new
      set_defaults(_new_hash)

      each do |key, value|
        _new_hash[key] = convert_value(value, for: :to_hash)
      end
      _new_hash
    end
481182
def merge!(hash)
      hash.each do |key, value|
        if config_contexts.key?(key)
          # Grab the config context and let internal_get cache it if so desired
          config_contexts[key].restore(value)
        else
          configuration[key] = value
        end
      end
      self
    end
1038149
def flatten(hash)
        hash.each_with_object({}) do |(key, value), h|
          if value.instance_of?(Hash)
            value.map do |k, v|
              # We could add recursion here if we ever had more than 2 levels
              h["#{key}.#{k}"] = v
            end
          else
            h[key] = value
          end
        end
      end
1099434
protected function deepMergeInto(Hash $into, Hash $other)
    {
        foreach ($other as $key => $value) {
            if (is_object($value)
                && $value instanceof self
                && $into->hasKey($key)
            ) {
                $value = $this->deepMergeInto($into[$key], $value);
            }

            $into[$key] = $value;
        }

        return $into;
    }
456550
def union(other)
      if self.serializer != other.serializer
        other = other.reserialize(serializer)
      end

      new_jrdd = jrdd.union(other.jrdd)
      RDD.new(new_jrdd, context, serializer, deserializer)
    end
796012
def deep_merge!(target, hash)
      hash.each do |key, value|
        target[key] = if value.is_a?(Hash) && target[key].is_a?(Hash)
                        deep_merge(target[key], value)
                      else
                        value
                      end
      end
      target
    end
457958
def flat_hash(hash, keys = [])
      new_hash = {}

      hash.each do |key, val|
        new_hash[format_key(keys + [key])] = val unless
          val.is_a?(Array) || val.is_a?(Hash)
        new_hash.merge!(flat_hash(val, keys + [key])) if val.is_a? Hash

        if val.is_a? Array
          val.each do |v|
            if v.is_a? Hash
              new_hash.merge!(flat_hash(v, keys + [key])) do |key, f, s|
                Array(f) << s
              end
            else
              formatted_key = format_key(keys + [key])
              new_hash[formatted_key] =
                new_hash[formatted_key] ? (Array(new_hash[formatted_key]) << v) : v
            end
          end
        end
      end

      new_hash
    end
931638
def **(other)
      if other.is_a?(Numeric)
        self.class.new(to_hash.merge(:exponent => exponent * other))
      else
        fail TypeError, "Can't raise #{self} to #{other}."
      end
    end
1351165
def combine_diffs(diff_one, diff_two)
      Hash.new { |hash, key| hash[key] = [[], []] }.tap do |combined_diff|
        diff_one.each do |change|
          combined_diff[change.old_position].first << change
        end

        diff_two.each do |change|
          combined_diff[change.old_position].last << change
        end
      end
    end
1107261
def update(other_hash)
      other_hash.each_pair { |key, value| regular_writer(convert_key(key), convert_value(value)) }
      self
    end