diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-21 19:47:39 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-21 19:47:39 +0000 |
commit | d9bfa822ea7e23dcc0dd1572773495419d89e145 (patch) | |
tree | 8bd66f5787510e1ee4d108621901dbbf4d6d03db /test | |
parent | 92fd1940fee3870c89b2e0424a55cdb0f95c3a71 (diff) | |
download | ruby-d9bfa822ea7e23dcc0dd1572773495419d89e145.tar.gz |
* 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')
-rw-r--r-- | test/bigdecimal/test_bigdecimal.rb | 4 |
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 |