summaryrefslogtreecommitdiff
path: root/test/ruby/test_float.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_float.rb')
-rw-r--r--test/ruby/test_float.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb
index a8ce76e..e534ab2 100644
--- a/test/ruby/test_float.rb
+++ b/test/ruby/test_float.rb
@@ -446,6 +446,8 @@ class TestFloat < Test::Unit::TestCase
assert_equal(1, suppress_warning {Float(([1] * 10000).join)}.infinite?)
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('0xf.fp') }
assert_equal(1, suppress_warning {Float("1e10_00")}.infinite?)
assert_raise(TypeError) { Float(nil) }
o = Object.new