lib/rubocop/cop/layout/indent_assignment.rb in rubocop-0.74.0 vs lib/rubocop/cop/layout/indent_assignment.rb in rubocop-0.75.0

- old
+ new

@@ -31,15 +31,23 @@ def check_assignment(node, rhs) return unless rhs return unless node.loc.operator return if node.loc.operator.line == rhs.first_line - base = display_column(node.source_range) + base = display_column(leftmost_multiple_assignment(node).source_range) check_alignment([rhs], base + configured_indentation_width) end def autocorrect(node) AlignmentCorrector.correct(processed_source, node, column_delta) + end + + def leftmost_multiple_assignment(node) + return node unless node.parent&.assignment? + + leftmost_multiple_assignment(node.parent) + + node.parent end end end end end