mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Fix to work match cache with peek next optimization (#9459)
This commit is contained in:
parent
1817d644ee
commit
597955aae8
2 changed files with 11 additions and 1 deletions
|
@ -3758,14 +3758,15 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
|
|||
|
||||
CASE(OP_PUSH_IF_PEEK_NEXT) MOP_IN(OP_PUSH_IF_PEEK_NEXT);
|
||||
GET_RELADDR_INC(addr, p);
|
||||
CHECK_MATCH_CACHE;
|
||||
if (*p == *s) {
|
||||
p++;
|
||||
CHECK_MATCH_CACHE;
|
||||
STACK_PUSH_ALT(p + addr, s, sprev, pkeep);
|
||||
MOP_OUT;
|
||||
JUMP;
|
||||
}
|
||||
p++;
|
||||
INC_NUM_FAILS;
|
||||
MOP_OUT;
|
||||
JUMP;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue