mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
string.c: removed unused variable
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7d0b7fb4cf
commit
d9c6135c5b
2 changed files with 5 additions and 5 deletions
|
@ -1,3 +1,7 @@
|
|||
Tue Dec 8 17:36:36 2015 Martin Duerst <duerst@it.aoyama.ac.jp>
|
||||
|
||||
* string.c: removed unused variable
|
||||
|
||||
Tue Dec 8 16:23:40 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* enumerator.c (lazy_grep_v): add Enumerator::Lazy#grep_v as well
|
||||
|
|
6
string.c
6
string.c
|
@ -4545,8 +4545,7 @@ str_gsub(int argc, VALUE *argv, VALUE str, int bang)
|
|||
{
|
||||
VALUE pat, val = Qnil, repl, match, match0 = Qnil, dest, hash = Qnil;
|
||||
struct re_registers *regs;
|
||||
long beg, n;
|
||||
long beg0, end0;
|
||||
long beg, beg0, end0;
|
||||
long offset, blen, slen, len, last;
|
||||
enum {STR, ITER, MAP} mode = STR;
|
||||
char *sp, *cp;
|
||||
|
@ -4582,7 +4581,6 @@ str_gsub(int argc, VALUE *argv, VALUE str, int bang)
|
|||
}
|
||||
|
||||
offset = 0;
|
||||
n = 0;
|
||||
blen = RSTRING_LEN(str) + 30; /* len + margin */
|
||||
dest = rb_str_buf_new(blen);
|
||||
sp = RSTRING_PTR(str);
|
||||
|
@ -4593,8 +4591,6 @@ str_gsub(int argc, VALUE *argv, VALUE str, int bang)
|
|||
ENC_CODERANGE_SET(dest, rb_enc_asciicompat(str_enc) ? ENC_CODERANGE_7BIT : ENC_CODERANGE_VALID);
|
||||
|
||||
do {
|
||||
n++;
|
||||
|
||||
match = rb_backref_get();
|
||||
regs = RMATCH_REGS(match);
|
||||
if (RB_TYPE_P(pat, T_STRING)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue