From 3ca0948f68d1055cd980992dcb68deced0f4d704 Mon Sep 17 00:00:00 2001 From: shyouhei Date: Fri, 19 Jan 2018 01:45:36 +0000 Subject: INFINITY is float. That of double is HUGE_VAL. It seems HUGE_VAL is already used. Why not eliminate INTINITY. NAN is also float. That of double is called nan(). This is also fixed. Signed-off-by: Urabe, Shyouhei git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'array.c') diff --git a/array.c b/array.c index adcee1cce6..5bc69f6899 100644 --- a/array.c +++ b/array.c @@ -5012,7 +5012,7 @@ rb_ary_cycle_size(VALUE self, VALUE args, VALUE eobj) n = RARRAY_AREF(args, 0); } if (RARRAY_LEN(self) == 0) return INT2FIX(0); - if (n == Qnil) return DBL2NUM(INFINITY); + if (n == Qnil) return DBL2NUM(HUGE_VAL); mul = NUM2LONG(n); if (mul <= 0) return INT2FIX(0); n = LONG2FIX(mul); -- cgit v1.2.3