Skip to content
Browse files

Remove BigDecimal#to_d

This was backported for Ruby 1.8 support and is no longer needed.

Signed-off-by: David Celis <me@davidcel.is>
  • Loading branch information...
1 parent 85d820b commit c87b27ebde4c5a0bc172ffce59faaadb20301dec @davidcelis davidcelis committed
View
7 activesupport/lib/active_support/core_ext/big_decimal/conversions.rb
@@ -2,13 +2,6 @@
require 'bigdecimal/util'
class BigDecimal
- # Backport this method if it doesn't exist
- unless method_defined?(:to_d)
- def to_d
- self
- end
- end
-
DEFAULT_STRING_FORMAT = 'F'
def to_formatted_s(*args)
if args[0].is_a?(Symbol)
View
5 activesupport/test/core_ext/bigdecimal_test.rb
@@ -2,11 +2,6 @@
require 'active_support/core_ext/big_decimal'
class BigDecimalTest < ActiveSupport::TestCase
- def test_to_d
- bd = BigDecimal.new '10'
- assert_equal bd, bd.to_d
- end
-
def test_to_s
bd = BigDecimal.new '0.01'
assert_equal '0.01', bd.to_s

0 comments on commit c87b27e

Please sign in to comment.
Something went wrong with that request. Please try again.