1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* math.c (domain_check): check errno first.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-01-17 10:24:27 +00:00
parent 12278f0b70
commit 441619b73c
2 changed files with 8 additions and 4 deletions

View file

@ -1,3 +1,7 @@
Sun Jan 17 19:24:25 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* math.c (domain_check): check errno first.
Sun Jan 17 14:24:35 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/iconv/iconv.c (rb_str_derive): use long.

2
math.c
View file

@ -27,10 +27,10 @@ extern VALUE rb_to_float(VALUE val);
static void
domain_check(double x, double y, const char *msg)
{
if (!errno) {
if (!isnan(y)) return;
else if (isnan(x)) return;
else {
if (!errno) {
#if defined(EDOM)
errno = EDOM;
#else