aboutsummaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-30 05:29:37 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-30 05:29:37 +0000
commit84fe38438311911211c2d415967ed7c07624175b (patch)
tree2d5faeecbb5aa3263350c24b3f5e30cfe0b6cbbb /string.c
parent44cfd58dc5f3949ff5cbcf7350a3e76d6ff1c49c (diff)
downloadruby-84fe38438311911211c2d415967ed7c07624175b.tar.gz
* string.c (rb_str_succ): use wrapped character as a carry for
ASCII incompatible encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/string.c b/string.c
index 29473251a3..945241ca3d 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;
}
}