Fixed mrb_iv_remove with immediate objects; fix #4519

The #4520 tried to address the issue, but it changes the type of
`mrb_check_frozen` argument; close #4520
This commit is contained in:
Yukihiro "Matz" Matsumoto
2019-06-25 18:41:17 +09:00
parent 6724416d5c
commit 63d8b5e1e3
+1 -1
View File
@@ -521,11 +521,11 @@ mrb_obj_iv_inspect(mrb_state *mrb, struct RObject *obj)
MRB_API mrb_value
mrb_iv_remove(mrb_state *mrb, mrb_value obj, mrb_sym sym)
{
mrb_check_frozen(mrb, mrb_obj_ptr(obj));
if (obj_iv_p(obj)) {
iv_tbl *t = mrb_obj_ptr(obj)->iv;
mrb_value val;
mrb_check_frozen(mrb, mrb_obj_ptr(obj));
if (iv_del(mrb, t, sym, &val)) {
return val;
}