diff options
author | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-01-11 00:46:35 +0000 |
---|---|---|
committer | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-01-11 00:46:35 +0000 |
commit | ff57fbf2a69dbd8af929e747d0f7262803b78b1d (patch) | |
tree | 5a76cb15abeed6de7b2607c4289d644c76891a80 /numeric.c | |
parent | 60e9c4e62ae0ae46671789c97decf7be7d2af7f7 (diff) |
* numeric.c (Init_Numeric): turn off floating point exceptions
on bcc32. "1e300".to_f had crashed by overflow.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2768,6 +2768,9 @@ Init_Numeric() #elif defined(_UNICOSMP) /* Turn off floating point exceptions for divide by zero, etc. */ _set_Creg(0, 0); +#elif defined(__BORLANDC__) + /* Turn off floating point exceptions for overflow, etc. */ + _control87(MCW_EM, MCW_EM); #endif id_coerce = rb_intern("coerce"); id_to_i = rb_intern("to_i"); |