ruby/ruby — pull request #487 by ColinDKelley (2013-12-22 00:07:31+00:00)
Title: Magic comment "immutable: string" makes "literal".freeze the default for that file

Add magic comment `# -*- immutable: string -*-` to Ruby that implies `.freeze` on every string literal in the file. To get a mutable string in a file that starts with the magic comment, use `String.new` or `''.dup`.

More details, background, and rationale are here:

http://development.invoca.com/magic-comment-immutable-string-makes-ruby-2-1s-literal-freeze-optimization-the-default/