class RuboCop::Cop::Style::ParallelAssignment::AssignmentSorter

def tsort_each_child(assignment)

def tsort_each_child(assignment)
  # yield all the assignments which must come after `assignment`
  # (due to dependencies on the previous value of the assigned var)
  my_lhs, _my_rhs = *assignment
  @assignments.each do |other|
    _other_lhs, other_rhs = *other
    if ((var = var_name(my_lhs)) && uses_var?(other_rhs, var)) ||
       (my_lhs.asgn_method_call? && accesses?(other_rhs, my_lhs))
      yield other
    end
  end
end