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 | 37703c588df3216335cfc070c165f71020215ac4 (patch) | |
tree | 5d17c91cb5e3b87184f0cca9951875f487523757 /numeric.c | |
parent | fadb00a4f99b329f5bb16d7013e9cc04a78c476d (diff) | |
download | ruby-37703c588df3216335cfc070c165f71020215ac4.tar.gz ruby-37703c588df3216335cfc070c165f71020215ac4.tar.xz ruby-37703c588df3216335cfc070c165f71020215ac4.zip |
* numeric.c (Init_Numeric): turn off floating point exceptions
on bcc32. "1e300".to_f had crashed by overflow.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2767,6 +2767,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"); |