summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordavidflanagan <davidflanagan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-10-25 05:08:08 +0000
committerdavidflanagan <davidflanagan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-10-25 05:08:08 +0000
commit30649a7456621a1eda60bab806f91d5b35ce2e29 (patch)
treef4ddb6cdc7fcb40577dc94702c06f436888aec35
parent2875de61e626daa72b09bce0a1685862b6622dea (diff)
downloadruby-30649a7456621a1eda60bab806f91d5b35ce2e29.tar.gz
ruby-30649a7456621a1eda60bab806f91d5b35ce2e29.tar.xz
ruby-30649a7456621a1eda60bab806f91d5b35ce2e29.zip
* parse.y (parser_tokspace): increment tokidx
fixes test failure at [test/ruby/test_stringchar.rb:72] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--parse.y8
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index cddf6a2ce..c9c93d93f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Oct 25 13:59:53 2007 David Flanagan <davidflanagan@ruby-lang.org>
+ * 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@ruby-lang.org>
* lib/uri.rb, lib/uri/ldaps.rb: added LDAPS
diff --git a/parse.y b/parse.y
index 3182ceee0..8803ddff8 100644
--- a/parse.y
+++ b/parse.y
@@ -4917,13 +4917,13 @@ parser_newtok(struct parser_params *parser)
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