Skip to content

Commit 213a262

Browse files
committed
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 mruby#6485
1 parent 96113a2 commit 213a262

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/hash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1828,7 +1828,7 @@ mrb_hash_compact(mrb_state *mrb, mrb_value hash)
18281828
uint32_t size = ht_p ? ht_size(h) : ar_size(h);
18291829
uint32_t dec = 0;
18301830

1831-
mrb_check_frozen(mrb, h);
1831+
hash_modify(mrb, hash);
18321832
H_EACH(h, entry) {
18331833
if (mrb_nil_p(entry->val)) {
18341834
entry_delete(entry);

0 commit comments

Comments
 (0)