diff options
author | Miles Georgi <azimux@gmail.com> | 2011-12-11 12:59:59 -0800 |
---|---|---|
committer | Miles Georgi <azimux@gmail.com> | 2011-12-11 13:08:50 -0800 |
commit | 3d6eafe32ed498784dba2b9782bbf7df47ebeb6b (patch) | |
tree | d1b6b93a7c0f6c0260dd2e245c5670cbfe8e456d /activesupport/lib/active_support | |
parent | 6887aed31bc4f60bdc3291acd8a2a7a9bca206db (diff) | |
download | rails-3d6eafe32ed498784dba2b9782bbf7df47ebeb6b.tar.gz rails-3d6eafe32ed498784dba2b9782bbf7df47ebeb6b.tar.bz2 rails-3d6eafe32ed498784dba2b9782bbf7df47ebeb6b.zip |
Overrode Hash#nested_under_indifferent_access in HashWithIndifferentAccess
to return self.
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/hash_with_indifferent_access.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/hash_with_indifferent_access.rb b/activesupport/lib/active_support/hash_with_indifferent_access.rb index 636f019cd5..674e4acfd6 100644 --- a/activesupport/lib/active_support/hash_with_indifferent_access.rb +++ b/activesupport/lib/active_support/hash_with_indifferent_access.rb @@ -16,6 +16,10 @@ module ActiveSupport dup end + def nested_under_indifferent_access + self + end + def initialize(constructor = {}) if constructor.is_a?(Hash) super() |