mr_freeze
Real name: Dr Victor Fries
Description
Freeze arrays, hashes, and their contents
Example
gem install mr_freeze
# without mr_freeze
hash = {"some" => "hash"}.freeze
hash["some"].sub!(/h/, "b")
# => uh oh... we've changed the string in place
# load mr_freeze
require 'rubygems'
require 'mr_freeze'
# with mr_freeze
hash = {"victor" => "fries"}.freeze!
hash["victor"].sub!(/f/, "c")
# => TypeError: can't modify frozen string
License
mr_freeze is released under the MIT License.