mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* string.c (rb_str_splice): return from void funtion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c456863bd6
commit
10f56f8fd0
2 changed files with 6 additions and 4 deletions
|
@ -1,9 +1,11 @@
|
|||
Sat Aug 25 16:06:40 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Sat Aug 25 16:13:59 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* io.c (swallow): removed condition using an unset variable.
|
||||
|
||||
* parse.y, re.c: re-applied revision 13092.
|
||||
|
||||
* string.c (rb_str_splice): return from void funtion.
|
||||
|
||||
Sat Aug 25 11:45:37 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* encoding.c: provide basic features for M17N.
|
||||
|
|
6
string.c
6
string.c
|
@ -1889,7 +1889,7 @@ rb_str_splice(VALUE str, long beg, long len, VALUE val)
|
|||
/* error check */
|
||||
beg = p - RSTRING_PTR(str); /* physical position */
|
||||
len = e - p; /* physical length */
|
||||
return rb_str_splice_0(str, beg, len, val);
|
||||
rb_str_splice_0(str, beg, len, val);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -2262,7 +2262,7 @@ str_gsub(int argc, VALUE *argv, VALUE str, int bang)
|
|||
slen = RSTRING_LEN(str);
|
||||
|
||||
rb_str_locktmp(dest);
|
||||
while (beg >= 0) {
|
||||
do {
|
||||
n++;
|
||||
match = rb_backref_get();
|
||||
regs = RMATCH(match)->regs;
|
||||
|
@ -2309,7 +2309,7 @@ str_gsub(int argc, VALUE *argv, VALUE str, int bang)
|
|||
cp = RSTRING_PTR(str) + offset;
|
||||
if (offset > RSTRING_LEN(str)) break;
|
||||
beg = rb_reg_search(pat, str, offset, 0);
|
||||
}
|
||||
} while (beg >= 0);
|
||||
if (RSTRING_LEN(str) > offset) {
|
||||
len = bp - buf;
|
||||
if (blen - len < RSTRING_LEN(str) - offset) {
|
||||
|
|
Loading…
Reference in a new issue