Actions
Bug #15941
closedIssue with String#scrub when given block and receiver is modified in block
Bug #15941:
Issue with String#scrub when given block and receiver is modified in block
Description
Files
Actions
Added by luke-gru (Luke Gruber) over 7 years ago. Updated about 7 years ago.
Description
Files
| scrub-modify-check.patch (3.82 KB) scrub-modify-check.patch | jeremyevans0 (Jeremy Evans), 06/19/2019 05:47 PM |
I guess the solution here would be something similar to String#gsub, with str_mod_check.
I can confirm this issue, and agree that handling it similarly to String#gsub makes sense. Attached is a patch that does that.
Patch lgtm, thanks!
Applied in changeset git|0f283054e7f568f09fbfc952d57ea6daf4abbd88.
Check that String#scrub block does not modify receiver
Similar to the check used for String#gsub. Can fix possible
segfault.
Fixes [Bug #15941]