use mrb_obj_equal to check pool

This commit is contained in:
Yukihiro Matsumoto
2012-08-02 22:15:49 +09:00
parent 6491693d00
commit b8b22c1d17
+1 -1
View File
@@ -364,7 +364,7 @@ new_lit(codegen_scope *s, mrb_value val)
int i;
for (i=0; i<s->plen; i++) {
if (memcmp(&s->pool[i], &val, sizeof(mrb_value)) == 0) return i;
if (mrb_obj_equal(s->mrb, s->pool[i], val)) return i;
}
if (s->plen == s->pcapa) {
s->pcapa *= 2;