mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8149168db6
commit
eb1f89015e
4 changed files with 10 additions and 3 deletions
|
@ -3,6 +3,13 @@ Tue Mar 11 00:46:29 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
|||
* 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 <matz@ruby-lang.org>
|
||||
|
||||
* 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 <nobu@ruby-lang.org>
|
||||
|
||||
* version.c (MKSTR): make US-ASCII. [ruby-dev:34010]
|
||||
|
|
2
eval.c
2
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
2
vm.c
2
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) {
|
||||
|
|
Loading…
Reference in a new issue