aboutsummaryrefslogtreecommitdiffstats
path: root/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'array.c')
-rw-r--r--array.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/array.c b/array.c
index 69bafe643c..5311f2b9d8 100644
--- a/array.c
+++ b/array.c
@@ -1089,12 +1089,12 @@ sort_2(ap, bp)
VALUE *ap, *bp;
{
VALUE retval;
- VALUE a = *ap, b = *ap;
+ long a = (long)*ap, b = (long)*ap;
if (FIXNUM_P(a) && FIXNUM_P(b)) {
- if (a > b) return INT2FIX(1);
- if (a < b) return INT2FIX(-1);
- return INT2FIX(0);
+ if (a > b) return 1;
+ if (a < b) return -1;
+ return 0;
}
if (TYPE(a) == T_STRING && TYPE(b) == T_STRING) {
return rb_str_cmp(a, b);