From 868d2e528fce86f380a2d099877f6cb8ffd1ff69 Mon Sep 17 00:00:00 2001 From: Clayton Smith Date: Thu, 15 Dec 2016 09:36:22 -0500 Subject: Fix crash when exponent is -2147483648 --- test/t/string.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') 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 -- cgit v1.2.3