diff options
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | numeric.c | 5 |
2 files changed, 6 insertions, 3 deletions
@@ -1,3 +1,7 @@ +Wed Feb 21 22:29:45 2007 Akinori MUSHA <knu@iDaemons.org> + + * numeric.c (fix_equal): A bit more optimization. + Wed Feb 21 17:40:37 2007 Yukihiro Matsumoto <matz@ruby-lang.org> * numeric.c (fix_equal): remove FIX2LONG() to optimize. suggested @@ -2311,9 +2311,8 @@ fix_pow(VALUE x, VALUE y) static VALUE fix_equal(VALUE x, VALUE y) { - if (FIXNUM_P(y)) { - return (x == y)?Qtrue:Qfalse; - } + if (x == y) return Qtrue; + if (FIXNUM_P(y)) return Qfalse; switch (TYPE(y)) { case T_BIGNUM: return rb_big_eq(y, x); |
