From 37703c588df3216335cfc070c165f71020215ac4 Mon Sep 17 00:00:00 2001 From: ocean Date: Tue, 11 Jan 2005 00:46:35 +0000 Subject: * 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 --- ChangeLog | 5 +++++ numeric.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 91efc83ef..a7c428eff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Jan 11 09:44:40 2005 Hirokazu Yamamoto + + * numeric.c (Init_Numeric): turn off floating point exceptions + on bcc32. "1e300".to_f had crashed by overflow. + Tue Jan 11 03:10:10 2005 Minero Aoki * lib/fileutils.rb (copy_entry): could not copy symbolic link. diff --git a/numeric.c b/numeric.c index 6503e2604..873272e6d 100644 --- a/numeric.c +++ b/numeric.c @@ -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"); -- cgit