From c283c3e5d17c44da3dda3546be80f9bffa5ed3ef 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/trunk@7765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- numeric.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'numeric.c') diff --git a/numeric.c b/numeric.c index abf4cda39..71a6d10c2 100644 --- a/numeric.c +++ b/numeric.c @@ -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"); -- cgit