From e86c9cb57c0ee799ca66d18612e15c6c8983f872 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Mon, 30 Aug 2021 07:35:58 +0900 Subject: Do no use return values from `mrb_ensure_` functions. They return the checking argument without modification, so the values are already there. Maybe we should change the return type to `void` but keep them unchanged for compatibility. --- src/vm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/vm.c') diff --git a/src/vm.c b/src/vm.c index 50ad3b31d..a8120f5a5 100644 --- a/src/vm.c +++ b/src/vm.c @@ -2671,7 +2671,8 @@ RETRY_TRY_BLOCK: int i; int lim = a+b*2+1; - hash = mrb_ensure_hash_type(mrb, regs[a]); + hash = regs[a]; + mrb_ensure_hash_type(mrb, hash); for (i=a+1; i