diff options
author | Andrew White <andrew.white@unboxed.co> | 2016-11-13 22:35:51 +0000 |
---|---|---|
committer | Andrew White <andrew.white@unboxed.co> | 2016-11-13 23:09:03 +0000 |
commit | 2ff2b98032409d162cd2a0ffc1b21c63057f628d (patch) | |
tree | 69dea7e4526ee307ea258436cf684a0352ac2367 | |
parent | 0e8d297301305af9ac5d64e7cd2b0a418c139fce (diff) | |
download | rails-2ff2b98032409d162cd2a0ffc1b21c63057f628d.tar.gz rails-2ff2b98032409d162cd2a0ffc1b21c63057f628d.tar.bz2 rails-2ff2b98032409d162cd2a0ffc1b21c63057f628d.zip |
Remove deprecated new_from_hash_copying_default
-rw-r--r-- | activesupport/lib/active_support/hash_with_indifferent_access.rb | 9 | ||||
-rw-r--r-- | activesupport/test/core_ext/hash_ext_test.rb | 7 |
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 |