- Supports custom key encoder
- Added
InsensitiveHash#merge_recursive!
- Now allowing underscores for spaces is by default on, and cannot be turned off.
- "Inherited insensitivity" had been a great source of confusion, as it stores transformed version of the given Array of Hash. From 0.3.0, Hash values and descendant Hashes are converted to be insensitive only on the initialization of InsensitiveHash. Refer to the following code
ih = {}.insensitive
ih[:a] = { :b => :c }
ih[:a]['B'] # nil
# Initialize another InsensitiveHash
ih2 = ih.insensitive
ih2[:a]['B'] # :c
- Bug fix: Invalid
dup
,clone
behavior - :safe setting from
Hash#insensitive
- Key-clash detection made optional with
InsensitiveHash#safe=
- Ruby 1.8 compatibility
- :underscore option added
InsensitiveHash::KeyClashError
added for safer operations- Bug fix: Preserve default/default_proc on merge/replace/insensitive
- Subtle behavioral change in
InsensitiveHash#replace
when called with an ordinary Hash
- Bug fix: Insensitive
fetch
- Major rewrite
- Constructor syntaxes have been changed to match those of standard Hash (not backward-compatible)
- (Almost) Complete implementation of standard Hash spec.
- Can opt-out of monkey-patching Hash with
require 'insensitive_hash/minimal'
- Removed duplicated code in the constructor
- More tests