aboutsummaryrefslogtreecommitdiffstats
path: root/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/compile.c b/compile.c
index b17eb253f3..c00ea73b8e 100644
--- a/compile.c
+++ b/compile.c
@@ -4077,7 +4077,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
case NODE_DEFN:{
VALUE iseqval = NEW_ISEQVAL(node->nd_defn,
- rb_str_new2(rb_id2name(node->nd_mid)),
+ rb_str_dup(rb_id2str(node->nd_mid)),
ISEQ_TYPE_METHOD);
debugp_param("defn/iseq", iseqval);
@@ -4093,7 +4093,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
case NODE_DEFS:{
VALUE iseqval = NEW_ISEQVAL(node->nd_defn,
- rb_str_new2(rb_id2name(node->nd_mid)),
+ rb_str_dup(rb_id2str(node->nd_mid)),
ISEQ_TYPE_METHOD);
debugp_param("defs/iseq", iseqval);