Frozen string literals
Hi, Ruby 2.3 introduced support for frozen string literalsPros
- less memory consumption
- performance (less GC preasure)
- safer code
- mutable functions like force_encoding or gsub! can't be called on frozen strings anymore, this may cause incompatibility with some plugins, but it's very easy to fix and still maintain the backwards compatibility
- a magic comment has to be added at the top of each rb file :-(
I attached a patch based on master that passes all tests.
There're some garbage changes like removed whitespaces, I'll clean it up if it's approved.
What do you think?