Closed ixti closed 8 years ago
Oh. I'm sorry. Didn't read article mentioned in description to the bottom. It actually mentions .freeze
and some more info.
Note for myself: read linked articles from the top to the bottom before giving any advices :D
Oh. I'm sorry. Didn't read article mentioned in description to the bottom. It actually mentions .freeze and some more info.
Not at all! Thanks for opening this issue.
Description is not really correct. Difference between
:symbol
key and"string"
keys is that Symbols are immutable constants, while in case of using a String key you creating that string over and over again. Starting with Ruby 2.1, you can mark string as frozen and it will be created only once:See: