Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
62 lines (46 sloc) 1.99 KB

Ice Nine

Deep Freeze Ruby Objects

Build Status


# Freezes most objects
hash   = IceNine.deep_freeze('a' => '1')
array  = IceNine.deep_freeze([ 'a', 'b', 'c' ])
range  = IceNine.deep_freeze('a'..'z')
struct = IceNine.deep_freeze(, :b).new('a', 'b'))
object = IceNine.deep_freeze(
user   = IceNine.deep_freeze('dkubb'))

# Add core extension for Object#deep_freeze (not required by default)
require 'ice_nine/core_ext/object'

object =


With Rubygems:

$ gem install ice_nine
$ irb -rubygems
>> require 'ice_nine'
=> true

With git and local working copy:

$ git clone git://
$ cd ice_nine
$ rake install
$ irb -rubygems
>> require 'ice_nine'
=> true

Note on Patches/Pull Requests

  • If you want your code merged into the mainline, please discuss the proposed changes with me before doing any work on it. This library is still in early development, and it may not always be clear the direction it is going. Some features may not be appropriate yet, may need to be deferred until later when the foundation for them is laid, or may be more applicable in a plugin.
  • Fork the project.
  • Make your feature addition or bug fix.
  • Add specs for it. This is important so I don't break it in a future version unintentionally. Tests must cover all branches within the code, and code must be fully covered.
  • Commit, do not mess with Rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Run "rake ci". This must pass and not show any regressions in the metrics for the code to be merged.
  • Send me a pull request. Bonus points for topic branches.


Copyright © 2012 Dan Kubb. See LICENSE for details.

Jump to Line
Something went wrong with that request. Please try again.