Permalink
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...
davidcelis committed Feb 1, 2014
1 parent 85d820b commit c87b27ebde4c5a0bc172ffce59faaadb20301dec
@@ -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)
@@ -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.