* 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
This commit is contained in:
ocean 2005-01-11 00:46:35 +00:00
Родитель 60e9c4e62a
Коммит ff57fbf2a6
2 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Tue Jan 11 09:37:53 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
* numeric.c (Init_Numeric): turn off floating point exceptions
on bcc32. "1e300".to_f had crashed by overflow.
Mon Jan 10 23:07:45 2005 Nobuyoshi Nakada <nobu@ruby-lang.org> Mon Jan 10 23:07:45 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
* variable.c (rb_autoload): hide internal data from ruby level. * variable.c (rb_autoload): hide internal data from ruby level.

Просмотреть файл

@ -2768,6 +2768,9 @@ Init_Numeric()
#elif defined(_UNICOSMP) #elif defined(_UNICOSMP)
/* Turn off floating point exceptions for divide by zero, etc. */ /* Turn off floating point exceptions for divide by zero, etc. */
_set_Creg(0, 0); _set_Creg(0, 0);
#elif defined(__BORLANDC__)
/* Turn off floating point exceptions for overflow, etc. */
_control87(MCW_EM, MCW_EM);
#endif #endif
id_coerce = rb_intern("coerce"); id_coerce = rb_intern("coerce");
id_to_i = rb_intern("to_i"); id_to_i = rb_intern("to_i");