Setting output separator for IO object


#1

(Crossposting note: I have also posted this question at
http://stackoverflow.com/questions/42341623/ruby-setting-output-separator-for-io-object
because I didn’t get any response here).

From the documentation of IO#print:

“Writes the given object(s) to ios. … If the output record separator
($) is not nil, it will be appended to the output.”

If I take this literally, it meanst that I can only have a single output
separator (S) for all streams. But in general, I have several streams
open for writing. How can I set different output separators for them?