diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-21 13:30:17 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-21 13:30:17 +0000 |
commit | 4563573a6b762eab0acf96427d9d3b6f1d0c702f (patch) | |
tree | d967085a0447eebc21907a63fe0b18b060635c5e /numeric.c | |
parent | f67795869db1cb62992d19e94bcf83abd0f0686b (diff) | |
download | ruby-4563573a6b762eab0acf96427d9d3b6f1d0c702f.tar.gz |
* numeric.c (fix_equal): A bit more optimization.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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); |