aboutsummaryrefslogtreecommitdiffstats
path: root/vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm.c b/vm.c
index e3d7ff4bb8..9eda8014c0 100644
--- a/vm.c
+++ b/vm.c
@@ -286,7 +286,7 @@ collect_local_variables_in_env(rb_env_t *env, VALUE ary)
for (i = 0; i < env->block.iseq->local_table_size; i++) {
ID lid = env->block.iseq->local_table[i];
if (lid) {
- rb_ary_push(ary, rb_str_new2(rb_id2name(lid)));
+ rb_ary_push(ary, rb_str_dup(rb_id2str(lid)));
}
}
if (env->prev_envval) {