class RuboCop::Cop::Lint::BlockAlignment

def start_for_block_node(block_node)

def start_for_block_node(block_node)
  # Which node should we align the 'end' with?
  result = block_node
  while (parent = result.parent)
    break if !parent || !parent.loc
    break if parent.loc.line != block_node.loc.line &&
             !parent.masgn_type?
    break unless block_end_align_target?(parent, result)
    result = parent
  end
  # In offense message, we want to show the assignment LHS rather than
  # the entire assignment
  result, = *result while result.op_asgn_type? || result.masgn_type?
  result
end