diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-21 13:36:03 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-21 13:36:03 +0000 |
commit | 51c4ffa45b03262ddc183b815dba07462ef0a29f (patch) | |
tree | acf3f92e7cf2f2c34e6b8eedde7c935ad1c7e75d /time.c | |
parent | 2118eccc77a6643ef8ef973fd740015680429257 (diff) |
* internal.h (rb_fix_divmod_fix): like r54213, use FIX2NUM only if
x == FIXNUM_MIN && y == -1. This must be a rare case and it is
expected compiler to handle well.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r-- | time.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -109,7 +109,7 @@ mod(VALUE x, VALUE y) { if (FIXNUM_P(y)) { if (FIX2LONG(y) == 0) rb_num_zerodiv(); - if (FIXNUM_P(x)) return LONG2FIX(rb_mod(FIX2LONG(x), FIX2LONG(y))); + if (FIXNUM_P(x)) return rb_fix_mod_fix(x, y); } if (RB_TYPE_P(x, T_BIGNUM)) return rb_big_modulo(x, y); return rb_funcall(x, '%', 1, y); |