diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-16 04:05:53 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-16 04:05:53 +0000 |
commit | a9723e96f5032524d701795fcf93a0ef64e73583 (patch) | |
tree | 4e457f34710e224a8477da64da6a24af99c73fba /numeric.c | |
parent | 73549c501f9ebb741732b91d0ccdc255e6960a3b (diff) | |
download | bundler-a9723e96f5032524d701795fcf93a0ef64e73583.tar.gz |
numeric.c: avoid division by zero
Forgot to add in r65751.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3702,7 +3702,7 @@ static double fix_fdiv_double(VALUE x, VALUE y) { if (FIXNUM_P(y)) { - return (double)FIX2LONG(x) / (double)FIX2LONG(y); + return double_div_double(FIX2LONG(x), FIX2LONG(y)); } else if (RB_TYPE_P(y, T_BIGNUM)) { return rb_big_fdiv_double(rb_int2big(FIX2LONG(x)), y); |