summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-06 01:00:29 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-06 01:00:29 +0000
commita69423beb8e9d827eb4cadda35b21586767d8737 (patch)
treef7c175e84e14349714bf31bcd3da46c0292b805f /test
parent0ed5aee00074547ed58c55bef6d346a9a4dd4925 (diff)
* util.c (ruby_strtod): check there is at least 1 digit after
"0x" before ".". [ruby-dev:42183] #3790 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_float.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb
index 08ec63a6f9..1146b583f0 100644
--- a/test/ruby/test_float.rb
+++ b/test/ruby/test_float.rb
@@ -447,6 +447,7 @@ class TestFloat < Test::Unit::TestCase
assert(!Float(([1] * 10000).join("_")).infinite?) # is it really OK?
assert_raise(ArgumentError) { Float("1.0\x001") }
assert_equal(15.9375, Float('0xf.fp0'))
+ assert_raise(ArgumentError) { Float('0x') }
assert_raise(ArgumentError) { Float('0xf.fp') }
assert_equal(Float::INFINITY, Float('0xf.fp1000000000000000'))
assert_equal(1, suppress_warning {Float("1e10_00")}.infinite?)