diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-27 08:03:24 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-27 08:03:24 +0000 |
commit | f5482e4c38732db8912a68652735f8ddac020141 (patch) | |
tree | 74c399e9f94a9b9d6a965dc9116f1ebb13403f05 /test/bigdecimal | |
parent | ce2211bf04e31676609b2c842aa609ba8e249ce6 (diff) |
* ext/bigdecimal/bigdecimal.c (GetVpValueWithPrec): since methods
can be overridden, so should not make an assumption on the type
of results. [ruby-core:42969][Bug #6093]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/bigdecimal')
-rw-r--r-- | test/bigdecimal/test_bigdecimal.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/bigdecimal/test_bigdecimal.rb b/test/bigdecimal/test_bigdecimal.rb index 51dcb8e29b..deb2fa9a57 100644 --- a/test/bigdecimal/test_bigdecimal.rb +++ b/test/bigdecimal/test_bigdecimal.rb @@ -1,4 +1,5 @@ require_relative "testbase" +require_relative "../ruby/envutil" require 'thread' @@ -1303,4 +1304,10 @@ class TestBigDecimal < Test::Unit::TestCase assert_equal(1, y) assert_kind_of(c, y) end + + def test_to_d + bug6093 = '[ruby-core:42969]' + code = "exit(BigDecimal.new('10.0') == 10.0.to_d)" + assert_ruby_status(%w[-rbigdecimal -rbigdecimal/util -rmathn -], code, bug6093) + end end |