From 959af4bfcb074e711d6328333ac68a8ce838acaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Wed, 28 Oct 2020 21:51:17 +0000 Subject: [PATCH] Remove deprecated file `active_support/core_ext/numeric/inquiry` --- activesupport/CHANGELOG.md | 4 ++++ .../lib/active_support/core_ext/numeric/conversions.rb | 1 - .../lib/active_support/core_ext/numeric/inquiry.rb | 5 ----- activesupport/test/core_ext/numeric_ext_test.rb | 6 ------ guides/source/6_1_release_notes.md | 2 ++ 5 files changed, 6 insertions(+), 12 deletions(-) delete mode 100644 activesupport/lib/active_support/core_ext/numeric/inquiry.rb diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md index 0c2883af56a..60894f5e48f 100644 --- a/activesupport/CHANGELOG.md +++ b/activesupport/CHANGELOG.md @@ -1,3 +1,7 @@ +* Remove deprecated file `active_support/core_ext/numeric/inquiry`. + + *Rafael Mendonça França* + * Remove deprecated file `active_support/core_ext/module/reachable`. *Rafael Mendonça França* diff --git a/activesupport/lib/active_support/core_ext/numeric/conversions.rb b/activesupport/lib/active_support/core_ext/numeric/conversions.rb index 031cc2fc689..3e623e0d177 100644 --- a/activesupport/lib/active_support/core_ext/numeric/conversions.rb +++ b/activesupport/lib/active_support/core_ext/numeric/conversions.rb @@ -2,7 +2,6 @@ require "active_support/core_ext/big_decimal/conversions" require "active_support/number_helper" -require "active_support/core_ext/module/deprecation" module ActiveSupport module NumericWithFormat diff --git a/activesupport/lib/active_support/core_ext/numeric/inquiry.rb b/activesupport/lib/active_support/core_ext/numeric/inquiry.rb deleted file mode 100644 index 6b5240d051f..00000000000 --- a/activesupport/lib/active_support/core_ext/numeric/inquiry.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 Numeric#positive? and Numeric#negative? natively, so requiring active_support/core_ext/numeric/inquiry is no longer necessary. Requiring it will raise LoadError in Rails 6.1." diff --git a/activesupport/test/core_ext/numeric_ext_test.rb b/activesupport/test/core_ext/numeric_ext_test.rb index f9cf92a9c1f..13088082b50 100644 --- a/activesupport/test/core_ext/numeric_ext_test.rb +++ b/activesupport/test/core_ext/numeric_ext_test.rb @@ -411,10 +411,4 @@ class NumericExtFormattingTest < ActiveSupport::TestCase def test_in_milliseconds assert_equal 10_000, 10.seconds.in_milliseconds end - - def test_requiring_inquiry_is_deprecated - assert_deprecated do - require "active_support/core_ext/numeric/inquiry" - end - end end diff --git a/guides/source/6_1_release_notes.md b/guides/source/6_1_release_notes.md index ba31372306c..264212e0cfe 100644 --- a/guides/source/6_1_release_notes.md +++ b/guides/source/6_1_release_notes.md @@ -294,6 +294,8 @@ Please refer to the [Changelog][active-support] for detailed changes. * Remove deprecated file `active_support/core_ext/module/reachable`. +* Remove deprecated file `active_support/core_ext/numeric/inquiry`. + ### Deprecations ### Notable changes