Skip to content

Commit

Permalink
Pre-freeze ISeq names to avoid useless duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
byroot authored and tenderlove committed Mar 10, 2021
1 parent d00e7de commit 2de7fbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compile.c
Expand Up @@ -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("<class:%"PRIsVALUE">", rb_id2str(node->nd_cpath->nd_mid)),
rb_str_freeze(rb_sprintf("<class:%"PRIsVALUE">", 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) |
Expand All @@ -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("<module:%"PRIsVALUE">", rb_id2str(node->nd_cpath->nd_mid)),
rb_str_freeze(rb_sprintf("<module:%"PRIsVALUE">", 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);
Expand Down

0 comments on commit 2de7fbc

Please sign in to comment.