diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-19 01:45:36 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-19 01:45:36 +0000 |
commit | c81e096f5d2e31d04a412b48b23d46cef33a0866 (patch) | |
tree | 961c2602e81c6dc5f73e46a3a2d61565c4da16d8 /enum.c | |
parent | e8f19e9eb28176aba1c661d4654b217b447aa9ed (diff) | |
download | ruby-c81e096f5d2e31d04a412b48b23d46cef33a0866.tar.gz |
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 <shyouhei@ruby-lang.org>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enum.c')
-rw-r--r-- | enum.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2887,7 +2887,7 @@ enum_cycle_size(VALUE self, VALUE args, VALUE eobj) size = enum_size(self, args, 0); if (NIL_P(size) || FIXNUM_ZERO_P(size)) return size; - if (NIL_P(n)) return DBL2NUM(INFINITY); + if (NIL_P(n)) return DBL2NUM(HUGE_VAL); if (mul <= 0) return INT2FIX(0); n = LONG2FIX(mul); return rb_funcallv(size, '*', 1, &n); |