summaryrefslogtreecommitdiffstats
path: root/sample
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-20 15:52:56 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-20 15:52:56 +0000
commit20a2972824e61709dd83ed120848d6808da48678 (patch)
treee63daaa59d60e1d793f688fee537191d15b449a6 /sample
parent56399a9dab56af5a228d430bdea7fc0a25d722f2 (diff)
downloadruby-20a2972824e61709dd83ed120848d6808da48678.tar.gz
ruby-20a2972824e61709dd83ed120848d6808da48678.tar.xz
ruby-20a2972824e61709dd83ed120848d6808da48678.zip
* sample/test.rb: avoid the MSVCRT *printf problem(float).
[ruby-dev:20037] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rw-r--r--sample/test.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/sample/test.rb b/sample/test.rb
index ebed59396..b37178f96 100644
--- a/sample/test.rb
+++ b/sample/test.rb
@@ -995,8 +995,11 @@ nan.test(-0.001);
nan.test(1.0/0);
nan.test(-1.0/0);
-s = "3.7517675036461267e+17"
-test_ok(s == sprintf("%.16e", s.to_f))
+#s = "3.7517675036461267e+17"
+#test_ok(s == sprintf("%.16e", s.to_f))
+f = 3.7517675036461267e+17
+test_ok(f == sprintf("%.16e", f).to_f)
+
test_check "bignum"
def fact(n)