From 782236e3bd5982930c22d3cf4955ec76474c8cec Mon Sep 17 00:00:00 2001 From: shyouhei Date: Sat, 20 Jan 2018 03:16:59 +0000 Subject: add missing/nan.c instead of scattering #ifdef HAVE_NANF here and there define our own nan() unless defined elsewhere. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- rational.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'rational.c') diff --git a/rational.c b/rational.c index c1c1081446..d82d487d51 100644 --- a/rational.c +++ b/rational.c @@ -1073,11 +1073,7 @@ nurat_expt(VALUE self, VALUE other) } if (RB_FLOAT_TYPE_P(num)) { /* infinity due to overflow */ if (RB_FLOAT_TYPE_P(den)) -#ifdef HAVE_NANF return DBL2NUM(nan("")); -#else - return DBL2NUM((double)NAN); -#endif return num; } if (RB_FLOAT_TYPE_P(den)) { /* infinity due to overflow */ -- cgit v1.2.3