summaryrefslogtreecommitdiffstats
path: root/numeric.c
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-21 13:30:17 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-21 13:30:17 +0000
commit02edb7bde68c1cb2f0659919e065a8ec5f1581a8 (patch)
treed967085a0447eebc21907a63fe0b18b060635c5e /numeric.c
parent50a75bd052e6fdd5ad82a2fd0c8dfc875aa7a8c2 (diff)
downloadruby-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.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/numeric.c b/numeric.c
index c94eb63b9..756f510ca 100644
--- a/numeric.c
+++ b/numeric.c
@@ -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);