aboutsummaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
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;
}
}