diff options
author | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-26 15:40:27 +0000 |
---|---|---|
committer | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-26 15:40:27 +0000 |
commit | 5ba05758fe549404a5b64fba6418278d16be8cec (patch) | |
tree | 59905f589c7b09d840ade60cbbe97ba60b57169a /test/bigdecimal | |
parent | a987000bbc62348e49f43e2a4fc5128f9345bb59 (diff) |
* ext/bigdecimal/lib/bigdecimal/util.rb (BigDecimal#to_d): added
for adapting other Numeric subclasses. [ruby-dev:44245]
* test/bigdecimal/test_bigdecimal_util.rb: test for the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/bigdecimal')
-rw-r--r-- | test/bigdecimal/test_bigdecimal_util.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/bigdecimal/test_bigdecimal_util.rb b/test/bigdecimal/test_bigdecimal_util.rb new file mode 100644 index 0000000000..c4483715ea --- /dev/null +++ b/test/bigdecimal/test_bigdecimal_util.rb @@ -0,0 +1,10 @@ +require_relative "testbase" + +require 'bigdecimal/util' + +class TestBigDecimalUtil < Test::Unit::TestCase + def test_BigDecimal_to_d + x = BigDecimal(1) + assert_same(x, x.to_d) + end +end |