method
to_sym
v1_8_7_72 -
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
to_sym()Returns the symbol whose integer value is fix. See also Fixnum#id2name.
fred = :fred.to_i fred.id2name #=> "fred" fred.to_sym #=> :fred