From ff3a5ebed6ffbe3e70481531cfb969b497aa73ad Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Tue, 15 Feb 2022 18:36:38 +0900 Subject: [PATCH] vm.c: should check type before hash access. Since the operand of double splat (`**`) may not be a hash, simple assertion (previous code since d42a64e) was not enough for this case. --- src/vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vm.c b/src/vm.c index 6133cbccac..9cb50847f2 100644 --- a/src/vm.c +++ b/src/vm.c @@ -2766,7 +2766,7 @@ mrb_vm_exec(mrb_state *mrb, const struct RProc *proc, const mrb_code *pc) int lim = a+b*2+1; hash = regs[a]; - mrb_assert(mrb_hash_p(hash)); + mrb_ensure_hash_type(mrb, hash); for (i=a+1; i