ruby-changes:2282
From: ko1@a...
Date: 25 Oct 2007 14:08:25 +0900
Subject: [ruby-changes:2282] davidflanagan - Ruby:r13773 (trunk): * parse.y (parser_tokspace): increment tokidx
davidflanagan 2007-10-25 14:08:08 +0900 (Thu, 25 Oct 2007) New Revision: 13773 Modified files: trunk/ChangeLog trunk/parse.y Log: * parse.y (parser_tokspace): increment tokidx fixes test failure at [test/ruby/test_stringchar.rb:72] http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/parse.y?r1=13773&r2=13772 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=13773&r2=13772 Index: ChangeLog =================================================================== --- ChangeLog (revision 13772) +++ ChangeLog (revision 13773) @@ -1,3 +1,7 @@ +Thu Oct 25 13:59:53 2007 David Flanagan <davidflanagan@r...> + * parse.y (parser_tokspace): increment tokidx + fixes test failure at [test/ruby/test_stringchar.rb:72] + Thu Oct 25 09:49:49 2007 akira yamada <akira@r...> * lib/uri.rb, lib/uri/ldaps.rb: added LDAPS Index: parse.y =================================================================== --- parse.y (revision 13772) +++ parse.y (revision 13773) @@ -4917,13 +4917,13 @@ static char * parser_tokspace(struct parser_params *parser, int n) { - int idx = tokidx + n; + tokidx += n; - if (idx >= toksiz) { - do {toksiz *= 2;} while (toksiz < idx); + if (tokidx >= toksiz) { + do {toksiz *= 2;} while (toksiz < tokidx); REALLOC_N(tokenbuf, char, toksiz); } - return &tokenbuf[tokidx]; + return &tokenbuf[tokidx-n]; } static void -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml