diff --git a/ChangeLog b/ChangeLog index 00e393f13f..37b0e20924 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,13 @@ Tue Mar 11 00:46:29 2008 Yukihiro Matsumoto * ruby.c (usage): remove some unimportant lines to fit -h message in a page. [ruby-dev:34018] +Mon Mar 10 17:11:00 2008 Yukihiro Matsumoto + + * eval.c (rb_f_local_variables): local_variables should return an + array of symbols. [ruby-dev:34008] + + * vm.c (collect_local_variables_in_env): ditto. + Mon Mar 10 15:53:48 2008 Nobuyoshi Nakada * version.c (MKSTR): make US-ASCII. [ruby-dev:34010] diff --git a/eval.c b/eval.c index 95b3a0371e..872eb2ccca 100644 --- a/eval.c +++ b/eval.c @@ -2627,7 +2627,7 @@ rb_f_local_variables(void) const char *vname = rb_id2name(lid); /* should skip temporary variable */ if (vname) { - rb_ary_push(ary, rb_str_new2(vname)); + rb_ary_push(ary, ID2SYM(lid)); } } } diff --git a/variable.c b/variable.c index 385831b086..be9dc47687 100644 --- a/variable.c +++ b/variable.c @@ -736,7 +736,7 @@ rb_alias_variable(ID name1, ID name2) entry2 = rb_global_entry(name2); if (!st_lookup(rb_global_tbl, name1, &data1)) { - entry1 = ALLOC(struct global_entry); + entry1 = ALLOC(struct global_entry); entry1->id = name1; st_add_direct(rb_global_tbl, name1, (st_data_t)entry1); } diff --git a/vm.c b/vm.c index d5a00c2fe1..38cde58139 100644 --- a/vm.c +++ b/vm.c @@ -285,7 +285,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_dup(rb_id2str(lid))); + rb_ary_push(ary, ID2SYM(lid)); } } if (env->prev_envval) {