From e4606db2d5315f5dba524672fed412b380954ba9 Mon Sep 17 00:00:00 2001 From: naruse Date: Mon, 14 Sep 2009 01:11:05 +0000 Subject: * string.c (rb_str_inspect): use rb_enc_mbc_to_codepoint because we already knew char is found and got length. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'string.c') diff --git a/string.c b/string.c index aa36c37d7..9aea029fe 100644 --- a/string.c +++ b/string.c @@ -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 == '#' && -- cgit