From 213a262b204ba49030f6d7d776b8fe17aeb50c94 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sat, 8 Mar 2025 11:15:37 +0900 Subject: [PATCH] hash.c (mrb_hash_compact): call hash_modify instead of mrb_check_frozen Currently, hash_modify() only calls mrb_check_frozen, but we may add new checks in the future; ref #6485 --- src/hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hash.c b/src/hash.c index 641e036b5..2f44724ac 100644 --- a/src/hash.c +++ b/src/hash.c @@ -1828,7 +1828,7 @@ mrb_hash_compact(mrb_state *mrb, mrb_value hash) uint32_t size = ht_p ? ht_size(h) : ar_size(h); uint32_t dec = 0; - mrb_check_frozen(mrb, h); + hash_modify(mrb, hash); H_EACH(h, entry) { if (mrb_nil_p(entry->val)) { entry_delete(entry);