From e9ef9bd0dbf1807ad82dc7227abbedff9d806a09 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 27 Feb 2012 08:25:46 +0000 Subject: 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 --- test/bigdecimal/test_bigdecimal.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test') 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 -- cgit v1.2.3