From 2de7fbcdbb90b2431e03b4c457e05f1aa2d2dd64 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Sat, 23 Jan 2021 10:16:43 +0100 Subject: [PATCH] Pre-freeze ISeq names to avoid useless duplication --- compile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compile.c b/compile.c index ce50168cb2..7c0ecec7a6 100644 --- a/compile.c +++ b/compile.c @@ -8662,7 +8662,7 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, in } case NODE_CLASS:{ const rb_iseq_t *class_iseq = NEW_CHILD_ISEQ(node->nd_body, - rb_sprintf("", rb_id2str(node->nd_cpath->nd_mid)), + rb_str_freeze(rb_sprintf("", rb_id2str(node->nd_cpath->nd_mid))), ISEQ_TYPE_CLASS, line); const int flags = VM_DEFINECLASS_TYPE_CLASS | (node->nd_super ? VM_DEFINECLASS_FLAG_HAS_SUPERCLASS : 0) | @@ -8679,7 +8679,7 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, in } case NODE_MODULE:{ const rb_iseq_t *module_iseq = NEW_CHILD_ISEQ(node->nd_body, - rb_sprintf("", rb_id2str(node->nd_cpath->nd_mid)), + rb_str_freeze(rb_sprintf("", rb_id2str(node->nd_cpath->nd_mid))), ISEQ_TYPE_CLASS, line); const int flags = VM_DEFINECLASS_TYPE_MODULE | compile_cpath(ret, iseq, node->nd_cpath);