From c70159b3562e09a37577b4c6913de3ec7b8f06b4 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Fri, 24 Sep 2021 17:10:11 +0900 Subject: [PATCH] Revert "vm.c: add assertions instead of `mrb_ensure_hash_type()`." This reverts commit 913a0a5a036664ab0d12a1af40b652412301c89f. In some cases, `OP_HASHADD` operand may not be `Hash`. We should check explicitly in those cases. --- src/vm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vm.c b/src/vm.c index b9957e5f0e..abb5d0c85d 100644 --- a/src/vm.c +++ b/src/vm.c @@ -2687,7 +2687,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_type(hash) == MRB_TT_HASH); + mrb_ensure_hash_type(mrb, hash); for (i=a+1; i