method

intern

ruby latest stable - Class: Symbol
intern()
public

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