# File lib/brakeman/processors/alias_processor.rb, line 275
  def process_array_join array, join_str
    result = s()

    join_value = if string? join_str
                   join_str.value
                 else
                   nil
                 end

    array[1..-2].each do |e|
      result << join_item(e, join_value)
    end

    result << join_item(array.last, nil)

    # Combine the strings at the beginning because that's what RubyParser does
    combined_first = ""
    result.each do |e|
      if string? e
        combined_first << e.value
      elsif e.is_a? String
        combined_first << e
      else
        break
      end
    end

    # Remove the strings at the beginning
    result.reject! do |e|
      if e.is_a? String or string? e
        true
      else
        break
      end
    end

    result.unshift combined_first

    # Have to fix up strings that follow interpolation
    result.reduce(s(:dstr)) do |memo, e|
      if string? e and node_type? memo.last, :evstr
        e.value = "#{join_value}#{e.value}"
      elsif join_value and node_type? memo.last, :evstr and node_type? e, :evstr
        memo << s(:str, join_value)
      end

      memo << e
    end
  end