Forum: Ruby Setting output separator for IO object

0fa73332c8e4a3b06ea439fd3f034322?d=identicon&s=25 Ronald Fischer (rovf)
on 2017-01-25 14:01
(Crossposting note: I have also posted this question at
http://stackoverflow.com/questions/42341623/ruby-s...
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?
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.