Commit b44309b4 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #1308 from suzukaze/refactor-hash-c

Refactor mrb_hash_has_keyWithKey() func in hash.c
parents 431479ad 4dfa2033
......@@ -925,17 +925,12 @@ mrb_hash_has_keyWithKey(mrb_state *mrb, mrb_value hash, mrb_value key)
{
khash_t(ht) *h = RHASH_TBL(hash);
khiter_t k;
mrb_bool result;
if (h) {
k = kh_get(ht, h, key);
result = (k != kh_end(h));
return mrb_bool_value(k != kh_end(h));
}
else {
result = 0;
}
return mrb_bool_value(result);
return mrb_false_value();
}
/* 15.2.13.4.13 */
......
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