diff options
author | Jean Boussier <[email protected]> | 2021-01-23 10:16:43 +0100 |
---|---|---|
committer | Aaron Patterson <[email protected]> | 2021-03-10 13:44:07 -0800 |
commit | 2de7fbcdbb90b2431e03b4c457e05f1aa2d2dd64 (patch) | |
tree | 589dc0fd1185e9b070df03604d97a8b9fb51f3ce /compile.c | |
parent | d00e7deb5c780d75e4edd3afa3e26ea02c296d8c (diff) |
Pre-freeze ISeq names to avoid useless duplication
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4119
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) | @@ -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); |