summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/string.c b/string.c
index 6ca4ba3c63..7c49b34630 100644
--- a/string.c
+++ b/string.c
@@ -1886,16 +1886,13 @@ rb_str_succ(VALUE orig)
}
n = s - sbeg;
}
- else {
- break;
- }
}
if (c == -1) { /* str contains no alnum */
c = '\001';
s = e;
while ((s = rb_enc_prev_char(sbeg, s, enc)) != 0) {
int limit = 256;
- if (cc == 0) cc = rb_enc_codepoint(s, e, enc);
+ cc = rb_enc_codepoint(s, e, enc);
while ((l = rb_enc_mbcput(++cc, carry, enc)) < 0 && --limit);
if (l > 0) {
if (l == (o = e - s)) goto overlay;