From: "headius (Charles Nutter)" Date: 2013-10-22T21:16:59+09:00 Subject: [ruby-core:57967] [ruby-trunk - Feature #9043][Open] Add String#f method as shortcut for #freeze Issue #9043 has been reported by headius (Charles Nutter). ---------------------------------------- Feature #9043: Add String#f method as shortcut for #freeze https://bugs.ruby-lang.org/issues/9043 Author: headius (Charles Nutter) Status: Open Priority: Normal Assignee: Category: Target version: We have String#b to create a binary-encoded String, and we have the "f" suffix (going away, hopefully) and the "literal".freeze optimization (#8992). I think it would be reasonable to add String#f as a shorter method for producing a frozen string. If String#f is added the "literal".freeze optimization could be dropped in favor of "literal".f. This would provide something very close to the original "literal"f syntax but in a backward-compatibility-friendly way (class String; alias f freeze; end). -- http://bugs.ruby-lang.org/