class RuboCop::Cop::ForToEachCorrector

def collection_end

def collection_end
  if collection_node.begin_type?
    collection_node.loc.end
  else
    collection_node.loc.expression
  end
end