summaryrefslogtreecommitdiff
path: root/regparse.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-15 16:27:13 (GMT)
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-15 16:27:13 (GMT)
commitc0ec326b7b9508f5d8f710c9e8c3904722df5dce (patch)
treeb57eab374c4585c836969d79a39736682fd95385 /regparse.c
parentc6fcb8ab9a7a0cc725c67ab7e2af6e8c94984307 (diff)
* regparse.c (add_ctype_to_cc_by_range): fix the first
character bigger than sb_out was dropped. * test/ruby/test_regexp.rb (TestRegexp#test_posix_bracket): add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regparse.c')
-rw-r--r--regparse.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/regparse.c b/regparse.c
index 876ad54..90b26a3 100644
--- a/regparse.c
+++ b/regparse.c
@@ -3797,8 +3797,7 @@ add_ctype_to_cc_by_range(CClassNode* cc, int ctype ARG_UNUSED, int not,
for (j = ONIGENC_CODE_RANGE_FROM(mbr, i);
j <= ONIGENC_CODE_RANGE_TO(mbr, i); j++) {
if (j >= sb_out) {
- if (j == ONIGENC_CODE_RANGE_TO(mbr, i)) i++;
- else if (j > ONIGENC_CODE_RANGE_FROM(mbr, i)) {
+ if (j > ONIGENC_CODE_RANGE_FROM(mbr, i)) {
r = add_code_range_to_buf(&(cc->mbuf), env, j,
ONIGENC_CODE_RANGE_TO(mbr, i));
if (r != 0) return r;