In general, to_sym returns the Symbol corresponding to an object. As sym is already a symbol, self is returned in this case.
to_sym
self
11108 11109 11110 11111 11112
# File 'string.c', line 11108 static VALUE sym_to_sym(VALUE sym) { return sym; }