Are you adding # frozen_string_literal: true to your config files
I was wondering if some of you are adding # frozen_string_literal: true
to their config files?
This never became the default in Ruby 3 unfortunately. See: https://bugs.ruby-lang.org/issues/11473#note-53
I don't use it, but I probably should although I'm sure I modify strings like this more often than I realize. It's a pretty great performance improvement when you can use it!
Some more good reading: https://www.mikeperham.com/2018/02/28/ruby-optimization-with-one-magic-comment/
I cannot agree more regarding the performance improvement. I also think it's a good practice to avoid changing a string that we wanted to be static ;-)