FANDOM


A Symbol is used like a string, it looks like :symbol and can be considered as if it meant "symbol" (note :symbol does not == "symbol").

The main advantage of symbols are that each reference to the same symbol is the same object id, whereas each time you use a string it is a new instantiation of an object (which can waste memory unnecessarily).