aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--numeric.c5
2 files changed, 6 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index e6b7903dd3..fdac8cfb02 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/numeric.c b/numeric.c
index c94eb63b94..756f510ca5 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);