diff options
author | kennyj <kennyj@gmail.com> | 2013-05-15 19:59:02 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2013-05-16 00:08:58 +0900 |
commit | f9c82f586cd73d9124d0fd89f9070e640a49adac (patch) | |
tree | f20527deb7fb1d8fc4535c88d253b7c2157d8f23 /activesupport/lib | |
parent | 877920ba55d99eac1d68859f4f83d626645afa3e (diff) | |
download | rails-f9c82f586cd73d9124d0fd89f9070e640a49adac.tar.gz rails-f9c82f586cd73d9124d0fd89f9070e640a49adac.tar.bz2 rails-f9c82f586cd73d9124d0fd89f9070e640a49adac.zip |
Fix HWIA#to_hash behavior with array of hashes.
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/hash_with_indifferent_access.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/hash_with_indifferent_access.rb b/activesupport/lib/active_support/hash_with_indifferent_access.rb index 9a9ed02bd9..bdb8877f55 100644 --- a/activesupport/lib/active_support/hash_with_indifferent_access.rb +++ b/activesupport/lib/active_support/hash_with_indifferent_access.rb @@ -231,7 +231,7 @@ module ActiveSupport def to_hash _new_hash= {} each do |key, value| - _new_hash[convert_key(key)] = convert_value(value,true) + _new_hash[convert_key(key)] = convert_value(value, true) end Hash.new(default).merge!(_new_hash) end @@ -246,7 +246,7 @@ module ActiveSupport _convert_for_to_hash ? value.to_hash : value.nested_under_indifferent_access elsif value.is_a?(Array) value = value.dup if value.frozen? - value.map! { |e| convert_value(e) } + value.map! { |e| convert_value(e, _convert_for_to_hash) } else value end |