Symbol
Returns the integer corresponding to a symbol.
Use Fixnum#to_sym to obtain the symbol corresponding to this integer.
In Ruby, reserved words, variable names, method names, and the like are controlled by these integers. Integers corresponding to objects (obtained via Object#object_id) and those corresponding to symbols are separate items.
Last updated