In Java, one can create an IO stream from a String like so:
Reader r = new StringReader("my text");
I'd like to be able to do the same in Ruby so I can take a string and treat it as an IO stream.
In Java, one can create an IO stream from a String like so:
Reader r = new StringReader("my text");
I'd like to be able to do the same in Ruby so I can take a string and treat it as an IO stream.