* string.c (rb_str_index): check if substring is broken.

* string.c (rb_str_rindex): ditto.

* string.c (rb_str_succ): should carry over.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2007-12-17 09:08:27 +00:00
parent b2d9f1e9d0
commit ea1b9d58b9
4 changed files with 22 additions and 6 deletions

View file

@ -553,7 +553,8 @@ rb_enc_precise_mbclen(const char *p, const char *e, rb_encoding *enc)
return n;
}
int rb_enc_ascget(const char *p, const char *e, int *len, rb_encoding *enc)
int
rb_enc_ascget(const char *p, const char *e, int *len, rb_encoding *enc)
{
int c, l;
if (e <= p)