diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-09-04 05:46:47 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-09-04 05:46:47 +0000 |
| commit | 254458202b82d5a74e306400b4a1dd628cd1f683 (patch) | |
| tree | 44b40b2cb07ea140f75e8316409971efb634d5f6 /variable.c | |
| parent | db0d5fcaadf939aeeb3038ffc8e5b1b1e25c120c (diff) | |
| download | ruby-254458202b82d5a74e306400b4a1dd628cd1f683.tar.gz ruby-254458202b82d5a74e306400b4a1dd628cd1f683.tar.xz ruby-254458202b82d5a74e306400b4a1dd628cd1f683.zip | |
* eval.c (rb_f_local_variables): list symbols.
* struct.c (rb_struct_s_members_m): ditto.
* variable.c (ivar_i): ditto.
* variable.c (gvar_i): ditto.
* variable.c (cv_i): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'variable.c')
| -rw-r--r-- | variable.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/variable.c b/variable.c index 47ef4dd54..11a301733 100644 --- a/variable.c +++ b/variable.c @@ -693,7 +693,7 @@ rb_gvar_defined(struct global_entry *entry) static int gvar_i(ID key, struct global_entry *entry, VALUE ary) { - rb_ary_push(ary, rb_str_new2(rb_id2name(key))); + rb_ary_push(ary, ID2SYM(key)); return ST_CONTINUE; } @@ -988,7 +988,7 @@ static int ivar_i(ID key, struct global_entry *entry, VALUE ary) { if (rb_is_instance_id(key)) { - rb_ary_push(ary, rb_str_new2(rb_id2name(key))); + rb_ary_push(ary, ID2SYM(key)); } return ST_CONTINUE; } @@ -1418,7 +1418,7 @@ rb_mod_const_of(VALUE mod, void *data) static int list_i(ID key, ID value, VALUE ary) { - rb_ary_push(ary, rb_str_new2(rb_id2name(key))); + rb_ary_push(ary, ID2SYM(key)); return ST_CONTINUE; } @@ -1633,7 +1633,7 @@ static int cv_i(ID key, VALUE value, VALUE ary) { if (rb_is_class_id(key)) { - VALUE kval = rb_str_new2(rb_id2name(key)); + VALUE kval = ID2SYM(key); if (!rb_ary_includes(ary, kval)) { rb_ary_push(ary, kval); } |
