method

to_sym

ruby latest stable - Class: Fixnum

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1_8_7_330) is shown here.

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