sub, sub!, gsub, and gsub! should set back references
#34405

shugo wants to merge shugo:safe_buffer_backref_fix into rails:master

We do not currently have an analysis of these two commits