summaryrefslogtreecommitdiffstats
path: root/array.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-07-05 14:23:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-07-05 14:23:38 +0000
commit1e63fcd6eb1f9d5bcda47cf19bc7be3a88bd43e0 (patch)
tree44491e770f257d56430c0550e7e6808d28d780b1 /array.c
parent7961a69a6575c8667b3e2df46a6cea06908baefe (diff)
downloadruby-1e63fcd6eb1f9d5bcda47cf19bc7be3a88bd43e0.tar.gz
ruby-1e63fcd6eb1f9d5bcda47cf19bc7be3a88bd43e0.tar.xz
ruby-1e63fcd6eb1f9d5bcda47cf19bc7be3a88bd43e0.zip
* array.c (sort_2): get rid of yet another bcc's bug.
fixed: [ruby-core:05152] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 79547bee3..cdb64bf4d 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);