Merge pull request #5000 from shuujii/unify-eql-receiver-in-Hash-according-to-Ruby

Unify `eql?` receiver in `Hash` according to Ruby
This commit is contained in:
Yukihiro "Matz" Matsumoto
2020-05-15 23:42:19 +09:00
committed by GitHub
+2 -2
View File
@@ -373,7 +373,7 @@ ht_put(mrb_state *mrb, htable *t, mrb_value key, mrb_value val)
deleted++;
continue;
}
if (ht_hash_equal(mrb, t, k, key)) {
if (ht_hash_equal(mrb, t, key, k)) {
seg->e[i].val = val;
return;
}
@@ -454,7 +454,7 @@ ht_get(mrb_state *mrb, htable *t, mrb_value key, mrb_value *vp)
return FALSE;
}
if (mrb_undef_p(k)) continue;
if (ht_hash_equal(mrb, t, k, key)) {
if (ht_hash_equal(mrb, t, key, k)) {
if (vp) *vp = seg->e[i].val;
return TRUE;
}