diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-10 04:40:40 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-10 04:40:40 +0000 |
| commit | 397ee1a31500368f9e06b47ec5da3ca9054bd751 (patch) | |
| tree | 3324905a8f40d34fd81696394704112b645fe805 /string.c | |
| parent | 5007c3461953e6ead84e69863b435c3c60e15bdb (diff) | |
* eval.c (rb_thread_select), string.c (str_gsub): suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@17070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
| -rw-r--r-- | string.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2140,7 +2140,7 @@ str_gsub(argc, argv, str, bang) slen = RSTRING(str)->len; rb_str_locktmp(dest); - while (beg >= 0) { + do { n++; match = rb_backref_get(); regs = RMATCH(match)->regs; @@ -2187,7 +2187,7 @@ str_gsub(argc, argv, str, bang) cp = RSTRING(str)->ptr + offset; if (offset > RSTRING(str)->len) break; beg = rb_reg_search(pat, str, offset, 0); - } + } while (beg >= 0); if (RSTRING(str)->len > offset) { len = bp - buf; if (blen - len < RSTRING(str)->len - offset) { |
