summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'array.c')
-rw-r--r--array.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/array.c b/array.c
index 5093163..626d83c 100644
--- a/array.c
+++ b/array.c
@@ -1078,7 +1078,10 @@ ary_cmp(ary, ary2)
return v;
}
}
- return INT2FIX(0);
+ len = RARRAY(ary)->len - RARRAY(ary2)->len;
+ if (len == 0) return INT2FIX(0);
+ if (len > 0) return INT2FIX(1);
+ return INT2FIX(-1);
}
static VALUE