summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-21 09:13:28 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-21 09:13:28 +0000
commitcb8ba75ca62243e684f5a6520865238a4347fa62 (patch)
treeab43e7121a18d2eca904b37c1a91004b7a5cc3df
parentbb753d9bd6e33d87ae05d40ce93454b8af1933d7 (diff)
downloadruby-cb8ba75ca62243e684f5a6520865238a4347fa62.tar.gz
ruby-cb8ba75ca62243e684f5a6520865238a4347fa62.tar.xz
ruby-cb8ba75ca62243e684f5a6520865238a4347fa62.zip
* regcomp.c (optimize_node_left): include equal on the condition of for-loop.
This bug also affects original Oniguruma. [ruby-core:27247] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@26143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--regcomp.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 115628255..968e24e96 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Dec 21 17:51:44 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * regcomp.c (optimize_node_left): include equal on the condition of for-loop.
+ This bug also affects original Oniguruma. [ruby-core:27247]
+
Mon Dec 21 10:03:33 2009 NARUSE, Yui <naruse@ruby-lang.org>
* regcomp.c (print_enc_string): follow enclen's change.
diff --git a/regcomp.c b/regcomp.c
index 4a4f1a7f4..bfddc225d 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -4792,7 +4792,7 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env)
copy_node_opt_info(opt, &nopt);
if (nopt.exb.len > 0) {
if (nopt.exb.reach_end) {
- for (i = 2; i < qn->lower &&
+ for (i = 2; i <= qn->lower &&
! is_full_opt_exact_info(&opt->exb); i++) {
concat_opt_exact_info(&opt->exb, &nopt.exb, env->enc);
}