Unverified Commit 3655d4e0 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

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

Unify `eql?` receiver in `Hash` according to Ruby
parents 4aba93c9 bc929656
...@@ -373,7 +373,7 @@ ht_put(mrb_state *mrb, htable *t, mrb_value key, mrb_value val) ...@@ -373,7 +373,7 @@ ht_put(mrb_state *mrb, htable *t, mrb_value key, mrb_value val)
deleted++; deleted++;
continue; continue;
} }
if (ht_hash_equal(mrb, t, k, key)) { if (ht_hash_equal(mrb, t, key, k)) {
seg->e[i].val = val; seg->e[i].val = val;
return; return;
} }
...@@ -454,7 +454,7 @@ ht_get(mrb_state *mrb, htable *t, mrb_value key, mrb_value *vp) ...@@ -454,7 +454,7 @@ ht_get(mrb_state *mrb, htable *t, mrb_value key, mrb_value *vp)
return FALSE; return FALSE;
} }
if (mrb_undef_p(k)) continue; 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; if (vp) *vp = seg->e[i].val;
return TRUE; return TRUE;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment