aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/hash_with_indifferent_access.rb
diff options
context:
space:
mode:
authorAditya Kapoor <aditya.kapoor@vinsol.com>2015-01-17 00:53:17 +0530
committerAditya Kapoor <aditya.kapoor@vinsol.com>2015-01-17 00:53:17 +0530
commit584931d749bfdd8553740bdcc6e4fef2c18ec523 (patch)
tree912f40d734760a713757747fbd76351e72269314 /activesupport/lib/active_support/hash_with_indifferent_access.rb
parent090c5211ced7b728df6176d5c9fc7437c107beaf (diff)
downloadrails-584931d749bfdd8553740bdcc6e4fef2c18ec523.tar.gz
rails-584931d749bfdd8553740bdcc6e4fef2c18ec523.tar.bz2
rails-584931d749bfdd8553740bdcc6e4fef2c18ec523.zip
Fix assignment for frozen value in HWIA
Diffstat (limited to 'activesupport/lib/active_support/hash_with_indifferent_access.rb')
-rw-r--r--activesupport/lib/active_support/hash_with_indifferent_access.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/hash_with_indifferent_access.rb b/activesupport/lib/active_support/hash_with_indifferent_access.rb
index 1468c62151..4f71f13971 100644
--- a/activesupport/lib/active_support/hash_with_indifferent_access.rb
+++ b/activesupport/lib/active_support/hash_with_indifferent_access.rb
@@ -267,7 +267,7 @@ module ActiveSupport
value.nested_under_indifferent_access
end
elsif value.is_a?(Array)
- unless options[:for] == :assignment
+ if options[:for] != :assignment || value.frozen?
value = value.dup
end
value.map! { |e| convert_value(e, options) }