Skip to content

Commit

Permalink
Remove deprecated method Numeric#to_formatted_s
Browse files Browse the repository at this point in the history
  • Loading branch information
pixeltrix committed Nov 14, 2016
1 parent 7c848e6 commit 90520d2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
4 changes: 4 additions & 0 deletions activesupport/CHANGELOG.md
@@ -1,3 +1,7 @@
* Remove deprecated method `Numeric#to_formatted_s`

*Andrew White*

* Remove deprecated method `alias_method_chain`

*Andrew White*
Expand Down
Expand Up @@ -126,11 +126,6 @@ def to_s(*args)
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.
Expand Down
6 changes: 0 additions & 6 deletions activesupport/test/core_ext/numeric_ext_test.rb
Expand Up @@ -376,12 +376,6 @@ def test_to_s__injected_on_proper_types
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)
Expand Down

0 comments on commit 90520d2

Please sign in to comment.