From 96a0cb693858b8fc269df13bbab049af3eb47c74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Wed, 28 Oct 2020 22:02:52 +0000 Subject: [PATCH] Remove deprecated file `active_support/core_ext/hash/transform_values` --- activesupport/CHANGELOG.md | 4 ++++ .../lib/active_support/core_ext/hash/transform_values.rb | 5 ----- activesupport/test/core_ext/hash/transform_values_test.rb | 8 -------- guides/source/6_1_release_notes.md | 2 ++ 4 files changed, 6 insertions(+), 13 deletions(-) delete mode 100644 activesupport/lib/active_support/core_ext/hash/transform_values.rb diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md index 83c9afe3a4..5916bf36b6 100644 --- a/activesupport/CHANGELOG.md +++ b/activesupport/CHANGELOG.md @@ -1,3 +1,7 @@ +* Remove deprecated file `active_support/core_ext/hash/transform_values`. + + *Rafael Mendonça França* + * Remove deprecated file `active_support/core_ext/hash/compact`. *Rafael Mendonça França* diff --git a/activesupport/lib/active_support/core_ext/hash/transform_values.rb b/activesupport/lib/active_support/core_ext/hash/transform_values.rb deleted file mode 100644 index e4aeb0e891..0000000000 --- a/activesupport/lib/active_support/core_ext/hash/transform_values.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true - -require "active_support/deprecation" - -ActiveSupport::Deprecation.warn "Ruby 2.5+ (required by Rails 6) provides Hash#transform_values natively, so requiring active_support/core_ext/hash/transform_values is no longer necessary. Requiring it will raise LoadError in Rails 6.1." diff --git a/activesupport/test/core_ext/hash/transform_values_test.rb b/activesupport/test/core_ext/hash/transform_values_test.rb index 37c51dabf7..4184d21557 100644 --- a/activesupport/test/core_ext/hash/transform_values_test.rb +++ b/activesupport/test/core_ext/hash/transform_values_test.rb @@ -3,14 +3,6 @@ require_relative "../../abstract_unit" require "active_support/core_ext/hash/indifferent_access" -class TransformValuesDeprecatedRequireTest < ActiveSupport::TestCase - test "requiring transform_values is deprecated" do - assert_deprecated do - require "active_support/core_ext/hash/transform_values" - end - end -end - class IndifferentTransformValuesTest < ActiveSupport::TestCase test "indifferent access is still indifferent after mapping values" do original = { a: "a", b: "b" }.with_indifferent_access diff --git a/guides/source/6_1_release_notes.md b/guides/source/6_1_release_notes.md index 29d14be27a..e86db1a175 100644 --- a/guides/source/6_1_release_notes.md +++ b/guides/source/6_1_release_notes.md @@ -300,6 +300,8 @@ Please refer to the [Changelog][active-support] for detailed changes. * Remove deprecated file `active_support/core_ext/hash/compact`. +* Remove deprecated file `active_support/core_ext/hash/transform_values`. + ### Deprecations ### Notable changes