-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
[Truffle] Can't modify frozen Regexp Error for Named Captures #4436
Comments
This is unfortunate. Maybe we can modify the code to avoid writing if |
Or even simpler, remove the caching since I doubt this is called enough to matter. |
I'm not sure which cache you're talking about, but the various regexp caches were added because they made a pretty big difference when testing gems. |
This caching the mapping of captures names and captured Strings. |
* It is not a fast-path operation, neither Regexp#names nor MatchData#names. * Caching still involves Hash#dup. * See #4436.
Environment
Also found while running in the addressable specs.
Expected Behavior
Actual Behavior
cc'ing: @eregon because it appears he has working on this recently: d88a101
MRI appears to avoid this frozen issue by always re-calculating. However maybe we have a way to cache this while avoiding this frozen error?
The text was updated successfully, but these errors were encountered: