class RuboCop::Cop::Lint::ImplicitStringConcatenation
def each_bad_cons(node)
def each_bad_cons(node) node.children.each_cons(2) do |child_node1, child_node2| # `'abc' 'def'` -> (dstr (str "abc") (str "def")) next unless string_literals?(child_node1, child_node2) next unless child_node1.last_line == child_node2.first_line # Make sure we don't flag a string literal which simply has # embedded newlines # `"abc\ndef"` also -> (dstr (str "abc") (str "def")) next unless child_node1.source[-1] == ending_delimiter(child_node1) yield child_node1, child_node2 end end