mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
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:
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user