summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2026-04-08 20:21:10 +0200
committerJean Boussier <jean.boussier@gmail.com>2026-04-08 21:52:23 +0200
commitd6528d631959c88db6062a39e201a0f3e89e691f (patch)
tree00f94b36bd9363941e4e006954a12559b21bc79d
parent5cf6c842e573a55dbc89619e939fd7fa8a203b87 (diff)
compile.c: avoid needless rehash
These were introduced in 165e10b6cf73f723c2f6af676b70aeb2d8cf85c9 when these hashes were allocated with `rb_hash_new()`. But since 4fb1438b9d7f617c7a8dc37935a960a24219e697 they are allocated with the right size, making the rehashing pure waste.
-rw-r--r--compile.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/compile.c b/compile.c
index 5decd5e59e..d39438c8ba 100644
--- a/compile.c
+++ b/compile.c
@@ -2731,7 +2731,6 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
data.len = len;
rb_hash_foreach(map, cdhash_set_label_i, (VALUE)&data);
- rb_hash_rehash(map);
freeze_hide_obj(map);
rb_ractor_make_shareable(map);
generated_iseq[code_index + 1 + j] = map;
@@ -14346,7 +14345,6 @@ ibf_load_object_hash(const struct ibf_load *load, const struct ibf_object_header
VALUE val = ibf_load_object(load, val_index);
rb_hash_aset(obj, key, val);
}
- rb_hash_rehash(obj);
if (header->internal) rb_obj_hide(obj);
if (header->frozen) {