Here you can see more information about the actual effect of frozen string on Ruby on Rails https://github.com/rails/rails/pull/21057. It is 11% in a relative small application, in big applications this improvement can be bigger.
[2]
DEFAULT_NAME = "JOHN DOE"
class A
def initialize(name)
@upcase_name = name.upcase!
end
end
name = DEFAULT_NAME
=> "JOHN DOE"
a = A.new(DEFAULT_NAME)
name
=> "john doe" # Global constant mutated silently! All shared references changed.
--
You received this message because you are subscribed to the Google Groups "sbonrails" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sbonrails+...@googlegroups.com.
To post to this group, send email to sbon...@googlegroups.com.
Visit this group at http://groups.google.com/group/sbonrails.
For more options, visit https://groups.google.com/d/optout.