mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Make absent operator work at the end of the input string
https://bugs.ruby-lang.org/issues/19104#change-100542
This commit is contained in:
parent
f093b619a4
commit
b8e542b463
Notes:
git
2022-12-12 05:26:56 +00:00
2 changed files with 8 additions and 0 deletions
|
@ -3774,6 +3774,11 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
|
|||
DATA_ENSURE(0);
|
||||
p += addr;
|
||||
}
|
||||
else if (s == end) {
|
||||
/* At the end of the string, just match with it */
|
||||
DATA_ENSURE(0);
|
||||
p += addr;
|
||||
}
|
||||
else {
|
||||
STACK_PUSH_ALT(p + addr, s, sprev, pkeep); /* Push possible point. */
|
||||
n = enclen(encode, s, end);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue