* 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
@ -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.
|
* io.c (swallow): removed condition using an unset variable.
|
||||||
|
|
||||||
* parse.y, re.c: re-applied revision 13092.
|
* 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>
|
Sat Aug 25 11:45:37 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* encoding.c: provide basic features for M17N.
|
* 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 */
|
/* error check */
|
||||||
beg = p - RSTRING_PTR(str); /* physical position */
|
beg = p - RSTRING_PTR(str); /* physical position */
|
||||||
len = e - p; /* physical length */
|
len = e - p; /* physical length */
|
||||||
return rb_str_splice_0(str, beg, len, val);
|
rb_str_splice_0(str, beg, len, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -2262,7 +2262,7 @@ str_gsub(int argc, VALUE *argv, VALUE str, int bang)
|
|||||||
slen = RSTRING_LEN(str);
|
slen = RSTRING_LEN(str);
|
||||||
|
|
||||||
rb_str_locktmp(dest);
|
rb_str_locktmp(dest);
|
||||||
while (beg >= 0) {
|
do {
|
||||||
n++;
|
n++;
|
||||||
match = rb_backref_get();
|
match = rb_backref_get();
|
||||||
regs = RMATCH(match)->regs;
|
regs = RMATCH(match)->regs;
|
||||||
@ -2309,7 +2309,7 @@ str_gsub(int argc, VALUE *argv, VALUE str, int bang)
|
|||||||
cp = RSTRING_PTR(str) + offset;
|
cp = RSTRING_PTR(str) + offset;
|
||||||
if (offset > RSTRING_LEN(str)) break;
|
if (offset > RSTRING_LEN(str)) break;
|
||||||
beg = rb_reg_search(pat, str, offset, 0);
|
beg = rb_reg_search(pat, str, offset, 0);
|
||||||
}
|
} while (beg >= 0);
|
||||||
if (RSTRING_LEN(str) > offset) {
|
if (RSTRING_LEN(str) > offset) {
|
||||||
len = bp - buf;
|
len = bp - buf;
|
||||||
if (blen - len < RSTRING_LEN(str) - offset) {
|
if (blen - len < RSTRING_LEN(str) - offset) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user