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>
This commit is contained in:
parent
85d820b169
commit
c87b27ebde
|
@ -2,13 +2,6 @@ require 'bigdecimal'
|
|||
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 'abstract_unit'
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue