aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorDavid Celis <me@davidcel.is>2014-02-01 10:26:50 -0800
committerDavid Celis <me@davidcel.is>2014-02-01 10:45:57 -0800
commitc87b27ebde4c5a0bc172ffce59faaadb20301dec (patch)
tree7d09a02415ca056abec9b0105eb33866ec651856 /activesupport
parent85d820b1693a52faddf1f838512e132906272e41 (diff)
downloadrails-c87b27ebde4c5a0bc172ffce59faaadb20301dec.tar.gz
rails-c87b27ebde4c5a0bc172ffce59faaadb20301dec.tar.bz2
rails-c87b27ebde4c5a0bc172ffce59faaadb20301dec.zip
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>
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/core_ext/big_decimal/conversions.rb7
-rw-r--r--activesupport/test/core_ext/bigdecimal_test.rb5
2 files changed, 0 insertions, 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