aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/hash_ext_test.rb
diff options
context:
space:
mode:
authorRobin Dupret <robin.dupret@gmail.com>2017-02-24 23:27:15 +0100
committerRobin Dupret <robin.dupret@gmail.com>2017-02-25 00:29:43 +0100
commite690a92b4498f2b65998656c625919767854623d (patch)
treec0d861773f4ba28ea0ec2c7375d47e29987baf4e /activesupport/test/core_ext/hash_ext_test.rb
parent87b2b6c5124732ff709b8e1900a99ba0a08f6982 (diff)
downloadrails-e690a92b4498f2b65998656c625919767854623d.tar.gz
rails-e690a92b4498f2b65998656c625919767854623d.tar.bz2
rails-e690a92b4498f2b65998656c625919767854623d.zip
Soft-deprecate the top-level HashWithIndifferentAccess class
Since using a `ActiveSupport::Deprecation::DeprecatedConstantProxy` would prevent people from inheriting this class and extending it from the `ActiveSupport::HashWithIndifferentAccess` one would break the ancestors chain, that's the best option we have here.
Diffstat (limited to 'activesupport/test/core_ext/hash_ext_test.rb')
-rw-r--r--activesupport/test/core_ext/hash_ext_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/hash_ext_test.rb b/activesupport/test/core_ext/hash_ext_test.rb
index a6e3e59433..efe211677e 100644
--- a/activesupport/test/core_ext/hash_ext_test.rb
+++ b/activesupport/test/core_ext/hash_ext_test.rb
@@ -8,6 +8,8 @@ require "active_support/core_ext/object/deep_dup"
require "active_support/inflections"
class HashExtTest < ActiveSupport::TestCase
+ HashWithIndifferentAccess = ActiveSupport::HashWithIndifferentAccess
+
class IndifferentHash < ActiveSupport::HashWithIndifferentAccess
end
@@ -1133,6 +1135,8 @@ class HashExtToParamTests < ActiveSupport::TestCase
end
class HashToXmlTest < ActiveSupport::TestCase
+ HashWithIndifferentAccess = ActiveSupport::HashWithIndifferentAccess
+
def setup
@xml_options = { root: :person, skip_instruct: true, indent: 0 }
end