Merge pull request #2444 from take-cheeze/fix_mrb_hash_tbl

Always return non-NULL in `mrb_hash_tbl`.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2014-07-03 23:41:47 +09:00
+1 -1
View File
@@ -265,7 +265,7 @@ mrb_hash_tbl(mrb_state *mrb, mrb_value hash)
khash_t(ht) *h = RHASH_TBL(hash);
if (!h) {
RHASH_TBL(hash) = kh_init(ht, mrb);
return RHASH_TBL(hash) = kh_init(ht, mrb);
}
return h;
}