1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

fix last commit.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2019-01-05 22:41:59 +00:00
parent 93583166c8
commit fc7f990666

6
hash.c
View file

@ -587,10 +587,6 @@ ar_alloc_table(VALUE hash)
return tab;
}
#define EQUAL(x,y) ((x) == (y) || rb_any_cmp((x),(y)) == 0)
#define PTR_EQUAL(ptr, hash_val, key_) \
((ptr)->hash == (hash_val) && EQUAL((key_), (ptr)->key))
static inline int
ar_equal(VALUE x, VALUE y)
{
@ -611,7 +607,7 @@ ar_find_entry(VALUE hash, st_hash_t hash_value, st_data_t key)
/* if table is NULL, then bound also should be 0 */
for (i = 0; i < bound; i++) {
if (PTR_EQUAL(RHASH_AR_TABLE_REF(hash, i), hash_value, key)) {
if (ar_ptr_equal(RHASH_AR_TABLE_REF(hash, i), hash_value, key)) {
return i;
}
}