From: Charles Oliver Nutter Date: 2011-10-26T06:37:14+09:00 Subject: [ruby-core:40376] Re: [ruby-trunk - Feature #5479] import StringIO into core, add String#to_io On Tue, Oct 25, 2011 at 1:56 PM, Haase, Konstantin wrote: > Maybe another idea would be to introduce a Streamable protocol/class/module, and add a to_stream method both to IO and StringIO. It could also ease implementing your own IO-like behavior. This is not without precedent: JRuby's IO has to_ methods to aid Java integration: to_inputstream, to_outputstream, and to_channel. And Java's InputStream, OutputStream, and Channel classes are decorated with to_io. - Charlie