summaryrefslogtreecommitdiffstats
path: root/hash.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-12 03:17:43 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-12 03:17:43 +0000
commit55b1327d1b1ab126eca4bdf52ee817f08357530d (patch)
treef261aefbaa3b0909e36946925be65178e0921612 /hash.c
parent148743016f1fc68a9d419696085831e279fc70fb (diff)
downloadruby-55b1327d1b1ab126eca4bdf52ee817f08357530d.tar.gz
ruby-55b1327d1b1ab126eca4bdf52ee817f08357530d.tar.xz
ruby-55b1327d1b1ab126eca4bdf52ee817f08357530d.zip
* string.c (rb_str_hash_cmp): lighter version of rb_str_cmp() for
hash comparison function. * hash.c (rb_any_cmp): use rb_str_hash_cmp(). * string.c (rb_str_casecmp): should return nil for incompatible comparison. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hash.c b/hash.c
index 781beefc6..53711b2cc 100644
--- a/hash.c
+++ b/hash.c
@@ -53,7 +53,7 @@ rb_any_cmp(VALUE a, VALUE b)
}
if (TYPE(a) == T_STRING && RBASIC(a)->klass == rb_cString &&
TYPE(b) == T_STRING && RBASIC(b)->klass == rb_cString) {
- return rb_str_cmp(a, b);
+ return rb_str_hash_cmp(a, b);
}
if (a == Qundef || b == Qundef) return -1;
if (SYMBOL_P(a) && SYMBOL_P(b)) {