> For the complete documentation index, see [llms.txt](https://enls.gitbook.io/rgss-reference-manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://enls.gitbook.io/rgss-reference-manual/standard-library/built-in-classes/object/symbol.md).

# Symbol

Returns the integer corresponding to a symbol.

Use Fixnum#to\_sym to obtain the symbol corresponding to this integer.

```
p :foo.to_i                         # => 8881
p :foo.to_i.to_sym                  # => :foo
```

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.
