aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activesupport/lib/active_support/hash_with_indifferent_access.rb9
-rw-r--r--activesupport/test/core_ext/hash_ext_test.rb7
2 files changed, 0 insertions, 16 deletions
diff --git a/activesupport/lib/active_support/hash_with_indifferent_access.rb b/activesupport/lib/active_support/hash_with_indifferent_access.rb
index 1bed489547..5919b89338 100644
--- a/activesupport/lib/active_support/hash_with_indifferent_access.rb
+++ b/activesupport/lib/active_support/hash_with_indifferent_access.rb
@@ -84,15 +84,6 @@ module ActiveSupport
end
end
- def self.new_from_hash_copying_default(hash)
- ActiveSupport::Deprecation.warn(<<-MSG.squish)
- `ActiveSupport::HashWithIndifferentAccess.new_from_hash_copying_default`
- has been deprecated, and will be removed in Rails 5.1. The behavior of
- this method is now identical to the behavior of `.new`.
- MSG
- new(hash)
- end
-
def self.[](*args)
new.merge!(Hash[*args])
end
diff --git a/activesupport/test/core_ext/hash_ext_test.rb b/activesupport/test/core_ext/hash_ext_test.rb
index d35fa491a2..8b816b3aad 100644
--- a/activesupport/test/core_ext/hash_ext_test.rb
+++ b/activesupport/test/core_ext/hash_ext_test.rb
@@ -1051,13 +1051,6 @@ class HashExtTest < ActiveSupport::TestCase
assert_nothing_raised { hash.to_hash }
end
- def test_new_from_hash_copying_default_should_not_raise_when_default_proc_does
- hash = Hash.new
- hash.default_proc = proc { |h, k| raise "walrus" }
-
- assert_deprecated { HashWithIndifferentAccess.new_from_hash_copying_default(hash) }
- end
-
def test_new_with_to_hash_conversion_copies_default
normal_hash = Hash.new(3)
normal_hash[:a] = 1