summaryrefslogtreecommitdiff
path: root/test/bigdecimal
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-27 08:25:46 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-27 08:25:46 +0000
commite9ef9bd0dbf1807ad82dc7227abbedff9d806a09 (patch)
treeb44a7626792d2eeda8d7074bfed768e7d0d30193 /test/bigdecimal
parent660a3298f5f19c136b530789c63ac2f6d422d771 (diff)
merge revision(s) 34829:
* 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/branches/ruby_1_9_3@34831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/bigdecimal')
-rw-r--r--test/bigdecimal/test_bigdecimal.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/bigdecimal/test_bigdecimal.rb b/test/bigdecimal/test_bigdecimal.rb
index a9524bb2ae..bd0739c31d 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'
@@ -1284,4 +1285,16 @@ class TestBigDecimal < Test::Unit::TestCase
end
end
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
+
+ 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