Home
Ruby
ActiveRecord
Array
CGI
Class
Collections
Database
Date
Design Patterns
Development
File Directory
GUI
Hash
Language Basics
Method
Network
Number
Rails
Range
Reflection
Statement
String
Threads
Time
Tk
Unit Test
Windows Platform
XML
Symbols « Language Basics « Ruby
Ruby
Language Basics
Symbols
1.
symbols is placeholders for identifiers and strings.
2.
Ruby uses tons of symbols internally. To prove it, execute this line of Ruby code
3.
Symbol in an array
4.
id2name
5.
Using Symbols as Hash Keys
6.
object_id of three string with the same value
7.
object_id of three symbols with the same name