def general_merge(h, docs, code)
      # Add all items in docs not already in result.
      docs.each_pair do |key, value|
        h[key] = value unless h[key]
      end

      # Add all items in code not already in result and mark them as
      # auto-detected.  But only if the explicit and auto-detected
      # names don't conflict.
      if Merger.can_be_autodetected?(docs, code)
        code.each_pair do |key, value|
          unless h[key]
            h[key] = value
            mark_autodetected(h, key)
          end
        end
      end
    end
def general_merge(h, docs, code)
      # Add all items in docs not already in result.
      docs.each_pair do |key, value|
        h[key] = value unless h[key]
      end

      # Add all items in code not already in result and mark them as
      # auto-detected.  But only if the explicit and auto-detected
      # names don't conflict.
      if Merger.can_be_autodetected?(docs, code)
        code.each_pair do |key, value|
          unless h[key]
            h[key] = value
            mark_autodetected(h, key)
          end
        end
      end
    end
Applies default merge algorithm to the rest of the data.