lib/rubocop/cop/style/line_end_concatenation.rb in rubocop-0.51.0 vs lib/rubocop/cop/style/line_end_concatenation.rb in rubocop-0.52.0
- old
+ new
@@ -39,13 +39,13 @@
end
end
def autocorrect(operator_range)
# Include any trailing whitespace so we don't create a syntax error.
- operator_range = range_with_surrounding_space(operator_range,
- :right,
- false)
+ operator_range = range_with_surrounding_space(range: operator_range,
+ side: :right,
+ newlines: false)
one_more_char = operator_range.resize(operator_range.size + 1)
# Don't create a double backslash at the end of the line, in case
# there already was a backslash after the concatenation operator.
operator_range = one_more_char if one_more_char.source.end_with?('\\')
@@ -59,10 +59,10 @@
return unless eligible_successor?(successor) &&
eligible_operator?(operator) &&
eligible_predecessor?(predecessor)
- return if operator.pos.line == successor.pos.line
+ return if operator.line == successor.line
next_successor = token_after_last_string(successor, index)
return unless eligible_next_successor?(next_successor)