diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-24 16:38:44 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-24 16:38:44 +0000 |
commit | 6ca558d6ab8e2553b32a415537c484bffd9b189c (patch) | |
tree | cbea16e53963e2f2a0ad8bb830f07fc43f458eb1 /struct.c | |
parent | a04a812ed0aa7424ea1f40756402d1f199a43308 (diff) | |
download | ruby-6ca558d6ab8e2553b32a415537c484bffd9b189c.tar.gz |
* proc.c (method_name): preserve Symbol's encoding.
* numeric.c (fix_id2name): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'struct.c')
-rw-r--r-- | struct.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -498,7 +498,6 @@ inspect_struct(VALUE s, VALUE dummy, int recur) for (i=0; i<RSTRUCT_LEN(s); i++) { VALUE slot; ID id; - const char *p; if (i > 0) { rb_str_cat2(str, ", "); @@ -506,8 +505,7 @@ inspect_struct(VALUE s, VALUE dummy, int recur) slot = RARRAY_PTR(members)[i]; id = SYM2ID(slot); if (rb_is_local_id(id) || rb_is_const_id(id)) { - p = rb_id2name(id); - rb_str_cat2(str, p); + rb_str_append(str, rb_id2str(id)); } else { rb_str_append(str, rb_inspect(slot)); |