lib/rubocop/cop/layout/end_alignment.rb in rubocop-1.22.1 vs lib/rubocop/cop/layout/end_alignment.rb in rubocop-1.22.2
- old
+ new
@@ -163,11 +163,10 @@
start_line_range(node)
end
end
def alignment_node_for_variable_style(node)
- return node.parent if node.case_type? && node.argument? &&
- node.loc.line == node.parent.loc.line
+ return node.parent if node.case_type? && node.argument? && same_line?(node, node.parent)
assignment = assignment_or_operator_method(node)
if assignment && !line_break_before_keyword?(assignment.source_range, node)
assignment