From e94eef6f98797f89a32aeb213d5f6c60a840ac0b Mon Sep 17 00:00:00 2001 From: dearblue Date: Sat, 24 Feb 2024 21:38:51 +0900 Subject: [PATCH] Omit NULL check of `e->cxt` in `OP_RETURN_BLK` Since `mrb->c` is never `NULL`, there is no need to check it beforehand. --- src/vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vm.c b/src/vm.c index ff5eeca37..870864b11 100644 --- a/src/vm.c +++ b/src/vm.c @@ -2311,7 +2311,7 @@ RETRY_TRY_BLOCK: if (MRB_PROC_ENV_P(dst)) { struct REnv *e = MRB_PROC_ENV(dst); - if (!MRB_ENV_ONSTACK_P(e) || (e->cxt && e->cxt != mrb->c)) { + if (!MRB_ENV_ONSTACK_P(e) || e->cxt != mrb->c) { localjump_error(mrb, LOCALJUMP_ERROR_RETURN); goto L_RAISE; }