summaryrefslogtreecommitdiffhomepage
path: root/test/t/string.rb
diff options
context:
space:
mode:
authorClayton Smith <[email protected]>2016-12-15 09:36:22 -0500
committerClayton Smith <[email protected]>2016-12-15 09:36:22 -0500
commit868d2e528fce86f380a2d099877f6cb8ffd1ff69 (patch)
tree617a933cf0a26f6b5b688172e09dcc236f1b27d8 /test/t/string.rb
parent73cc08772f1a11140b238525698bce0664326a50 (diff)
downloadmruby-868d2e528fce86f380a2d099877f6cb8ffd1ff69.tar.gz
mruby-868d2e528fce86f380a2d099877f6cb8ffd1ff69.zip
Fix crash when exponent is -2147483648
Diffstat (limited to 'test/t/string.rb')
-rw-r--r--test/t/string.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/t/string.rb b/test/t/string.rb
index 80fcbe6fa..20dc49d92 100644
--- a/test/t/string.rb
+++ b/test/t/string.rb
@@ -596,10 +596,14 @@ assert('String#to_f', '15.2.10.5.38') do
a = ''.to_f
b = '123456789'.to_f
c = '12345.6789'.to_f
+ d = '1e-2147483648'.to_f
+ e = '1e2147483648'.to_f
assert_float(0.0, a)
assert_float(123456789.0, b)
assert_float(12345.6789, c)
+ assert_float(0, d)
+ assert_float(Float::INFINITY, e)
end
assert('String#to_i', '15.2.10.5.39') do