Fixes `mrb_vm_ci_target_class_set()`
If `ci->u.target_class` was `NULL`, the value of the argument was always ignored.
This problem is caused by
ref.
MODIFY
include/mruby/proc.h
include/mruby/proc.h
@@ -157,15 +157,13 @@ static inline void
mrb_vm_ci_target_class_set(mrb_callinfo *ci, struct RClass *tc)
{
struct REnv *e = ci->u.env;
- if (e) {
- if (e->tt == MRB_TT_ENV) {
+ if (e && e->tt == MRB_TT_ENV) {
e->c = tc;
}
else {
ci->u.target_class = tc;
}
}
-}
static inline struct REnv *
mrb_vm_ci_env(const mrb_callinfo *ci)

Fixes `mrb_vm_ci_target_class_set()`

If `ci->u.target_class` was `NULL`, the value of the argument was always ignored.
This problem is caused by #5272.

ref. #5725