From c87b27ebde4c5a0bc172ffce59faaadb20301dec Mon Sep 17 00:00:00 2001 From: David Celis Date: Sat, 1 Feb 2014 10:26:50 -0800 Subject: [PATCH] Remove BigDecimal#to_d This was backported for Ruby 1.8 support and is no longer needed. Signed-off-by: David Celis --- .../lib/active_support/core_ext/big_decimal/conversions.rb | 7 ------- activesupport/test/core_ext/bigdecimal_test.rb | 5 ----- 2 files changed, 12 deletions(-) diff --git a/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb b/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb index 54b49e6d04..843c592669 100644 --- a/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb +++ b/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb @@ -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) diff --git a/activesupport/test/core_ext/bigdecimal_test.rb b/activesupport/test/core_ext/bigdecimal_test.rb index 61bf3f81e6..423a3f2e9d 100644 --- a/activesupport/test/core_ext/bigdecimal_test.rb +++ b/activesupport/test/core_ext/bigdecimal_test.rb @@ -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