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 | 02edb7bde68c1cb2f0659919e065a8ec5f1581a8 (patch) | |
tree | d967085a0447eebc21907a63fe0b18b060635c5e /numeric.c | |
parent | 50a75bd052e6fdd5ad82a2fd0c8dfc875aa7a8c2 (diff) | |
download | ruby-02edb7bde68c1cb2f0659919e065a8ec5f1581a8.tar.gz ruby-02edb7bde68c1cb2f0659919e065a8ec5f1581a8.tar.xz ruby-02edb7bde68c1cb2f0659919e065a8ec5f1581a8.zip |
* numeric.c (fix_equal): A bit more optimization.
git-svn-id: http://svn.ruby-lang.org/repos/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); |