* 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
@ -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
|
* ruby.c (usage): remove some unimportant lines to fit -h message
|
||||||
in a page. [ruby-dev:34018]
|
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>
|
Mon Mar 10 15:53:48 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* version.c (MKSTR): make US-ASCII. [ruby-dev:34010]
|
* 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);
|
const char *vname = rb_id2name(lid);
|
||||||
/* should skip temporary variable */
|
/* should skip temporary variable */
|
||||||
if (vname) {
|
if (vname) {
|
||||||
rb_ary_push(ary, rb_str_new2(vname));
|
rb_ary_push(ary, ID2SYM(lid));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
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++) {
|
for (i = 0; i < env->block.iseq->local_table_size; i++) {
|
||||||
ID lid = env->block.iseq->local_table[i];
|
ID lid = env->block.iseq->local_table[i];
|
||||||
if (lid) {
|
if (lid) {
|
||||||
rb_ary_push(ary, rb_str_dup(rb_id2str(lid)));
|
rb_ary_push(ary, ID2SYM(lid));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (env->prev_envval) {
|
if (env->prev_envval) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user