aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/hash_with_indifferent_access.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/hash_with_indifferent_access.rb')
-rw-r--r--activesupport/lib/active_support/hash_with_indifferent_access.rb18
1 files changed, 17 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 79e7feaf47..8638667082 100644
--- a/activesupport/lib/active_support/hash_with_indifferent_access.rb
+++ b/activesupport/lib/active_support/hash_with_indifferent_access.rb
@@ -316,4 +316,20 @@ module ActiveSupport
end
end
-HashWithIndifferentAccess = ActiveSupport::HashWithIndifferentAccess
+class HashWithIndifferentAccess < ActiveSupport::HashWithIndifferentAccess
+ def initialize(*)
+ ActiveSupport::Deprecation.warn "HashWithIndifferentAccess is deprecated!" \
+ "Use ActiveSupport::HashWithIndifferentAccess instead."
+ super
+ end
+
+ def self.inherited(*)
+ ActiveSupport::Deprecation.warn "HashWithIndifferentAccess is deprecated!" \
+ "Use ActiveSupport::HashWithIndifferentAccess instead."
+ super
+ end
+
+ def encode_with(coder)
+ coder.represent_object(nil, ActiveSupport::HashWithIndifferentAccess.new(self))
+ end
+end