mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
* regexec.c (onig_search): don't skip non-ANYCHARs when
.* fails to match. This causes to fail matching ANYCHAR_STAR with LOOK_BEHIND. This fix is workaround and disable the optimization. [ruby-dev:41851] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1df8d6dbc3
commit
b4608406f1
3 changed files with 12 additions and 5 deletions
|
@ -3636,11 +3636,6 @@ onig_search(regex_t* reg, const UChar* str, const UChar* end,
|
|||
MATCH_AND_RETURN_CHECK(orig_range);
|
||||
prev = s;
|
||||
s += enclen(reg->enc, s, end);
|
||||
|
||||
while (!ONIGENC_IS_MBC_NEWLINE(reg->enc, prev, end) && s < range) {
|
||||
prev = s;
|
||||
s += enclen(reg->enc, s, end);
|
||||
}
|
||||
} while (s < range);
|
||||
goto mismatch;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue