method

to_sym

ruby latest stable - Class: Symbol
to_sym()
public

In general, to_sym returns the Symbol corresponding to an object. As sym is already a symbol, self is returned in this case.