summaryrefslogtreecommitdiff
path: root/test/bigdecimal
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-21 19:47:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-21 19:47:39 +0000
commitd9bfa822ea7e23dcc0dd1572773495419d89e145 (patch)
tree8bd66f5787510e1ee4d108621901dbbf4d6d03db /test/bigdecimal
parent92fd1940fee3870c89b2e0424a55cdb0f95c3a71 (diff)
* ext/bigdecimal/bigdecimal.c (GetVpValue): support conversion from
Rational. [ruby-core:25697] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/bigdecimal')
-rw-r--r--test/bigdecimal/test_bigdecimal.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/bigdecimal/test_bigdecimal.rb b/test/bigdecimal/test_bigdecimal.rb
index 7eecc1ade1..2490c8469c 100644
--- a/test/bigdecimal/test_bigdecimal.rb
+++ b/test/bigdecimal/test_bigdecimal.rb
@@ -691,4 +691,8 @@ class TestBigDecimal < Test::Unit::TestCase
assert_equal(BigDecimal::SIGN_POSITIVE_ZERO, BigDecimal.new("1E-1" + "0" * 10000).sign)
assert_equal(BigDecimal::SIGN_NEGATIVE_ZERO, BigDecimal.new("-1E-1" + "0" * 10000).sign)
end
+
+ def test_coerce
+ assert_equal(2, 1 + BigDecimal.new("1"), '[ruby-core:25697]')
+ end
end