ruby-changes:40865
From: duerst <ko1@a...>
Date: Tue, 8 Dec 2015 17:36:56 +0900 (JST)
Subject: [ruby-changes:40865] duerst:r52944 (trunk): string.c: removed unused variable
duerst 2015-12-08 17:36:43 +0900 (Tue, 08 Dec 2015) New Revision: 52944 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52944 Log: string.c: removed unused variable Modified files: trunk/ChangeLog trunk/string.c Index: ChangeLog =================================================================== --- ChangeLog (revision 52943) +++ ChangeLog (revision 52944) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Dec 8 17:36:36 2015 Martin Duerst <duerst@i...> + + * string.c: removed unused variable + Tue Dec 8 16:23:40 2015 Nobuyoshi Nakada <nobu@r...> * enumerator.c (lazy_grep_v): add Enumerator::Lazy#grep_v as well Index: string.c =================================================================== --- string.c (revision 52943) +++ string.c (revision 52944) @@ -4545,8 +4545,7 @@ str_gsub(int argc, VALUE *argv, VALUE st https://github.com/ruby/ruby/blob/trunk/string.c#L4545 { 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 st https://github.com/ruby/ruby/blob/trunk/string.c#L4581 } 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 st https://github.com/ruby/ruby/blob/trunk/string.c#L4591 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)) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/