summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'array.c')
-rw-r--r--array.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/array.c b/array.c
index 79547bee37..cdb64bf4d8 100644
--- a/array.c
+++ b/array.c
@@ -1630,8 +1630,8 @@ sort_2(ap, bp, data)
if ((long)a < (long)b) return -1;
return 0;
}
- if (TYPE(a) == T_STRING && TYPE(b) == T_STRING) {
- return rb_str_cmp(a, b);
+ if (TYPE(a) == T_STRING) {
+ if (TYPE(b) == T_STRING) return rb_str_cmp(a, b);
}
retval = rb_funcall(a, id_cmp, 1, b);