* 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
This commit is contained in:
parent
2d74f3e682
commit
99d38f82e0
@ -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
|
||||
|
4
hash.c
4
hash.c
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user