summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-20 03:16:59 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-20 03:16:59 +0000
commit782236e3bd5982930c22d3cf4955ec76474c8cec (patch)
treefa81b2fb7d4c4341125ccc830764c18da15339c9 /marshal.c
parent76b609c8c3d4cae09e619aeee6ee5743a498fd3d (diff)
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
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/marshal.c b/marshal.c
index c6c3922283..4cfa2e10dc 100644
--- a/marshal.c
+++ b/marshal.c
@@ -1678,12 +1678,7 @@ r_object0(struct load_arg *arg, int *ivp, VALUE extmod)
const char *ptr = RSTRING_PTR(str);
if (strcmp(ptr, "nan") == 0) {
- d =
-#ifdef HAVE_NANF
- nan("");
-#else
- (double)NAN;
-#endif
+ d = nan("");
}
else if (strcmp(ptr, "inf") == 0) {
d = HUGE_VAL;