зеркало из https://github.com/github/ruby.git
* 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
This commit is contained in:
Родитель
d8e8849e35
Коммит
011776b4a6
|
@ -1,3 +1,8 @@
|
|||
Mon Sep 14 10:08:19 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* string.c (rb_str_inspect): use rb_enc_mbc_to_codepoint
|
||||
because we already knew char is found and got length.
|
||||
|
||||
Mon Sep 14 09:59:03 2009 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* include/ruby/ruby.h (NUM2INT, NUM2LL, INT2NUM, UINT2NUM),
|
||||
|
|
3
string.c
3
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 == '#' &&
|
||||
|
|
Загрузка…
Ссылка в новой задаче