|
|
|
|
|
by djur
1316 days ago
|
|
You can dynamically create symbols and expect them to be garbage collected as of Ruby 2.2. They only become "immortal" if you use them to define a method, instance variable, or constant. So the common use case of hash keys is fine. One important advantage of symbols versus strings is that Symbol#== is constant time. |
|