From 15e9979653c6394e04724176342cb81a2de3806e Mon Sep 17 00:00:00 2001 From: akr Date: Wed, 30 Jan 2008 05:29:37 +0000 Subject: * string.c (rb_str_succ): use wrapped character as a carry for ASCII incompatible encoding. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'string.c') diff --git a/string.c b/string.c index 29473251a..945241ca3 100644 --- a/string.c +++ b/string.c @@ -2203,6 +2203,10 @@ rb_str_succ(VALUE orig) /* wrapped to \0...\0. search next valid char. */ enc_succ_char(s, l, enc); } + if (!rb_enc_asciicompat(enc)) { + MEMCPY(carry, s, char, l); + carry_len = l; + } carry_pos = s - sbeg; } } -- cgit