diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-04-13 08:39:13 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-04-13 08:39:13 +0000 |
commit | 99d38f82e0ff0480822fe25047b07a07030a7c3e (patch) | |
tree | bd2647b1ebbcebc536475b43e26447a9fe6123d3 | |
parent | 2d74f3e682a706857cc6f9891180f6a33d1bfa9f (diff) | |
download | ruby-99d38f82e0ff0480822fe25047b07a07030a7c3e.tar.gz |
* hash.c (inspect_i): keep string's coderange.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | hash.c | 4 |
2 files changed, 6 insertions, 2 deletions
@@ -1,3 +1,7 @@ +Fri Apr 13 17:12:09 2012 NARUSE, Yui <naruse@ruby-lang.org> + + * hash.c (inspect_i): keep string's coderange. + Fri Apr 13 15:26:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org> * hash.c (rb_hash_aset, rb_hash_update, rb_hash_update_by): use @@ -1392,14 +1392,14 @@ inspect_i(VALUE key, VALUE value, VALUE str) str2 = rb_inspect(key); if (RSTRING_LEN(str) > 1) { - rb_str_cat2(str, ", "); + rb_str_buf_cat_ascii(str, ", "); } else { rb_enc_copy(str, str2); } rb_str_buf_append(str, str2); OBJ_INFECT(str, str2); - rb_str_buf_cat2(str, "=>"); + rb_str_buf_cat_ascii(str, "=>"); str2 = rb_inspect(value); rb_str_buf_append(str, str2); OBJ_INFECT(str, str2); |