Skip to content

Fix memoization for the /(...){0}/ case #13169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2025

Conversation

makenowjust
Copy link
Contributor

In this case, the previous implementation counted an extra number of opcodes to cache and the matching was unstable on memoization.

This patch is to fix that problem by not counting an number of opcodes to cache in the parentheses of (...){0}.

In this case, the previous implementation counted an extra number of
opcodes to cache and the matching was unstable on memoization.

This patch is to fix that problem by not counting an number of opcodes
to cache in the parentheses of `(...){0}`.
Copy link

All Tests passed!

✖️no tests failed ✔️61956 tests passed(2 flakes)

@makenowjust makenowjust enabled auto-merge (squash) April 24, 2025 11:10
@makenowjust makenowjust merged commit 18f8c51 into ruby:master Apr 24, 2025
86 checks passed
@makenowjust makenowjust deleted the fix/zero-rep-regexp branch April 24, 2025 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant