only one copy of symbol
irb(main):001:0> "string".object_id == "string".object_id
=> false
irb(main):002:0> :string.object_id == :string.object_id
=> true
The .object_id
method gets the ID of an object—it’s how Ruby knows whether two objects are the exact same object.
irb(main):002:0> string = "string"
=> "string"
irb(main):003:0> string.object_id == "string".object_id
=> false
irb(main):004:0> string = :string
=> :string
irb(main):005:0> string.object_id == :string.object_id
=> true