Project

General

Profile

Actions

Bug #15941

closed

Issue with String#scrub when given block and receiver is modified in block

Added by luke-gru (Luke Gruber) almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:93252]

Description

This should cause a segmentation fault:

s = "abc\u3042\xE3\x80"
loop do
    s.scrub{|bytes| s << "more content"; "?" }
end

Not something that should happen, but I thought it might cause undesired behavior.
Thank you for your time :)


Files

scrub-modify-check.patch (3.82 KB) scrub-modify-check.patch jeremyevans0 (Jeremy Evans), 06/19/2019 05:47 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0