aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorAndrew White <andrew.white@unboxed.co>2016-11-14 12:03:48 +0000
committerAndrew White <andrew.white@unboxed.co>2016-11-14 12:03:48 +0000
commit90520d2eee9093f46757a5e2e589d2237cc960f1 (patch)
tree48f0955739cdef97a0ff8b078e91fa6a20bd4ef0 /activesupport
parent7c848e6dd493ff236d33a0410a92f4c3e5cc3c7f (diff)
downloadrails-90520d2eee9093f46757a5e2e589d2237cc960f1.tar.gz
rails-90520d2eee9093f46757a5e2e589d2237cc960f1.tar.bz2
rails-90520d2eee9093f46757a5e2e589d2237cc960f1.zip
Remove deprecated method Numeric#to_formatted_s
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/CHANGELOG.md4
-rw-r--r--activesupport/lib/active_support/core_ext/numeric/conversions.rb5
-rw-r--r--activesupport/test/core_ext/numeric_ext_test.rb6
3 files changed, 4 insertions, 11 deletions
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md
index af75d44b3a..7c7d6efa58 100644
--- a/activesupport/CHANGELOG.md
+++ b/activesupport/CHANGELOG.md
@@ -1,3 +1,7 @@
+* Remove deprecated method `Numeric#to_formatted_s`
+
+ *Andrew White*
+
* Remove deprecated method `alias_method_chain`
*Andrew White*
diff --git a/activesupport/lib/active_support/core_ext/numeric/conversions.rb b/activesupport/lib/active_support/core_ext/numeric/conversions.rb
index cebfda8d31..946f8ddeab 100644
--- a/activesupport/lib/active_support/core_ext/numeric/conversions.rb
+++ b/activesupport/lib/active_support/core_ext/numeric/conversions.rb
@@ -126,11 +126,6 @@ module ActiveSupport::NumericWithFormat
end
end
end
-
- def to_formatted_s(*args)
- to_s(*args)
- end
- deprecate to_formatted_s: :to_s
end
# Ruby 2.4+ unifies Fixnum & Bignum into Integer.
diff --git a/activesupport/test/core_ext/numeric_ext_test.rb b/activesupport/test/core_ext/numeric_ext_test.rb
index a6e5ea5ab7..19dc4e5136 100644
--- a/activesupport/test/core_ext/numeric_ext_test.rb
+++ b/activesupport/test/core_ext/numeric_ext_test.rb
@@ -376,12 +376,6 @@ class NumericExtFormattingTest < ActiveSupport::TestCase
assert_equal "1 Million", BigDecimal("1000010").to_s(:human)
end
- def test_to_formatted_s_is_deprecated
- assert_deprecated do
- 5551234.to_formatted_s(:phone)
- end
- end
-
def test_to_s_with_invalid_formatter
assert_equal "123", 123.to_s(:invalid)
assert_equal "2.5", 2.5.to_s(:invalid)