mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
vm.c: check if target_class is NULL (when prepended).
This commit is contained in:
@@ -1750,10 +1750,7 @@ RETRY_TRY_BLOCK:
|
||||
mrb_exc_set(mrb, exc);
|
||||
goto L_RAISE;
|
||||
}
|
||||
if (target_class->flags & MRB_FL_CLASS_IS_PREPENDED) {
|
||||
target_class = mrb_vm_ci_target_class(ci);
|
||||
}
|
||||
else if (target_class->tt == MRB_TT_MODULE) {
|
||||
if ((target_class->flags & MRB_FL_CLASS_IS_PREPENDED) || target_class->tt == MRB_TT_MODULE) {
|
||||
target_class = mrb_vm_ci_target_class(ci);
|
||||
if (!target_class || target_class->tt != MRB_TT_ICLASS) {
|
||||
goto super_typeerror;
|
||||
|
||||
Reference in New Issue
Block a user