Skip to content
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

[PRISM] Fix segv with regex once flag #9207

Merged
merged 1 commit into from
Dec 12, 2023

Commits on Dec 12, 2023

  1. [PRISM] Fix segv with regex once flag

    When you have an interpolated regex with a `once` flag and local
    variable is outside the block created by the `once` flag, Prism would
    see a segv. This is because it was not taking the depth into account.
    
    To fix this, we need to add 1 to the `local_depth_offset` on the
    `scope`.
    
    Fixes: ruby/prism#2047
    eileencodes committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    bb2f6c2 View commit details
    Browse the repository at this point in the history