mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* array.c (rb_ary_cycle): typo in rdoc. a patch from Yugui
<yugui@yugui.sakura.ne.jp>. [ruby-dev:31748] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
629b1e4324
commit
edd7c787ad
19 changed files with 146 additions and 133 deletions
|
@ -209,7 +209,7 @@ static int to_ascii(OnigEncoding enc, UChar *s, UChar *end,
|
|||
buf[len++] = (UChar )code;
|
||||
}
|
||||
|
||||
p += enc_len(enc, p);
|
||||
p += enc_len(enc, p, end);
|
||||
if (len >= buf_size) break;
|
||||
}
|
||||
|
||||
|
@ -330,15 +330,15 @@ onig_snprintf_with_pattern(buf, bufsize, enc, pat, pat_end, fmt, va_alist)
|
|||
while (p < pat_end) {
|
||||
if (*p == '\\') {
|
||||
*s++ = *p++;
|
||||
len = enc_len(enc, p);
|
||||
len = enc_len(enc, p, pat_end);
|
||||
while (len-- > 0) *s++ = *p++;
|
||||
}
|
||||
else if (*p == '/') {
|
||||
*s++ = (unsigned char )'\\';
|
||||
*s++ = *p++;
|
||||
}
|
||||
else if (ONIGENC_IS_MBC_HEAD(enc, p)) {
|
||||
len = enc_len(enc, p);
|
||||
else if (ONIGENC_IS_MBC_HEAD(enc, p, pat_end)) {
|
||||
len = enc_len(enc, p, pat_end);
|
||||
if (ONIGENC_MBC_MINLEN(enc) == 1) {
|
||||
while (len-- > 0) *s++ = *p++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue