diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-14 01:11:05 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-14 01:11:05 +0000 |
commit | 011776b4a63f665858522b5e35493e74ac65ef94 (patch) | |
tree | e05950f77743d2145ab7f80f5901eb7235d26dc9 /string.c | |
parent | d8e8849e352b7b208c071e63acceb9131fe84969 (diff) | |
download | ruby-011776b4a63f665858522b5e35493e74ac65ef94.tar.gz |
* string.c (rb_str_inspect): use rb_enc_mbc_to_codepoint
because we already knew char is found and got length.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -4278,8 +4278,7 @@ rb_str_inspect(VALUE str) goto escape_codepoint; } n = MBCLEN_CHARFOUND_LEN(n); - - c = rb_enc_codepoint_len(p, pend, &n, enc); + c = rb_enc_mbc_to_codepoint(p, pend, enc); p += n; if (c == '"'|| c == '\\' || (c == '#' && |