From: Eric Wong Date: 2018-05-18T18:52:13+00:00 Subject: [ruby-core:87176] Re: [Ruby trunk Bug#14745] High memory usage when using String#replace with IO.copy_stream Good to know the destination buffer to #update helped :> > But I can imagine `String#exchange!` being a useful tool for > diligent string management. Maybe... As it stands, destination buffers for #read and #update are underutilized and I'm glad to see them being used more. Thus I'm not hopeful of #exchange! being widely adopted... When used, destination buffers would still offer better performance, anyways, as there's no extra object slot used. Unsubscribe: