# File lib/rexml/text.rb, line 249def write_with_substitutionout,inputcopy=input.clone# Doing it like this rather than in a loop improves the speedcopy.gsub!(SPECIALS[0],SUBSTITUTES[0])copy.gsub!(SPECIALS[1],SUBSTITUTES[1])copy.gsub!(SPECIALS[2],SUBSTITUTES[2])copy.gsub!(SPECIALS[3],SUBSTITUTES[3])copy.gsub!(SPECIALS[4],SUBSTITUTES[4])copy.gsub!(SPECIALS[5],SUBSTITUTES[5])out<<copyend