method

to_sym

v1_8_7_330 - Show latest stable - Class: Fixnum
to_sym()
public

Returns the symbol whose integer value is fix. See also Fixnum#id2name.

fred = :fred.to_i
fred.id2name   #=> "fred"
fred.to_sym    #=> :fred