def stringified_merge(target, other)
      other.each do |key, value|
        key = key.to_s # this line is what it's all about!
        existing = target[key]

        if value.is_a?(Hash) and (existing.is_a?(Hash) or existing.nil?)
          stringified_merge(existing || (target[key] = {}), value)
        else
          target[key] = value
        end
      end
    end
def stringified_merge(target, other)
      other.each do |key, value|
        key = key.to_s # this line is what it's all about!
        existing = target[key]

        if value.is_a?(Hash) and (existing.is_a?(Hash) or existing.nil?)
          stringified_merge(existing || (target[key] = {}), value)
        else
          target[key] = value
        end
      end
    end
def stringified_merge ( target , other ) other . each do | key , value | key = key . to_s # this line is what it's all about! existing = target [ key ] if value . is_a? ( Hash ) and ( existing . is_a? ( Hash ) or existing . nil? ) stringified_merge ( existing || ( target [ key ] = { } ) , value ) else target [ key ] = value end end end
Recursively merge into target hash by using stringified keys from the other one
Recursively merge into target hash by using stringified keys from the other one