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 | 0be854292dc0ca99fc9972ca88f9bf4954c9fcf0 (patch) | |
| tree | 8bd66f5787510e1ee4d108621901dbbf4d6d03db /test | |
| parent | c5a1c17148bb4916fd71bba369c158d0cdd76ac0 (diff) | |
| download | ruby-0be854292dc0ca99fc9972ca88f9bf4954c9fcf0.tar.gz ruby-0be854292dc0ca99fc9972ca88f9bf4954c9fcf0.tar.xz ruby-0be854292dc0ca99fc9972ca88f9bf4954c9fcf0.zip | |
* ext/bigdecimal/bigdecimal.c (GetVpValue): support conversion from
Rational. [ruby-core:25697]
git-svn-id: http://svn.ruby-lang.org/repos/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 7eecc1ade..2490c8469 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 |
