mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #5731 from dearblue/fix5725
Use `mrb->object_class` instead if `MRB_PROC_TARGET_CLASS()` is `NULL`
This commit is contained in:
@@ -828,6 +828,7 @@ mrb_vm_const_get(mrb_state *mrb, mrb_sym sym)
|
||||
proc = proc->upper;
|
||||
while (proc) {
|
||||
c2 = MRB_PROC_TARGET_CLASS(proc);
|
||||
if (!c2) c2 = mrb->object_class;
|
||||
if (c2 && iv_get(mrb, c2->iv, sym, &v)) {
|
||||
return v;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user