From: Clemens Hintze Date: 2000-10-10T08:10:02+09:00 Subject: [ruby-talk:5359] Re: string streams in Ruby? You wrote: > Is there any way, without going through "modifying the internals", > to convert Strings to look like files? This would allow me to do > things like I do not know whether this is what you search, but I had implemented a class StringIO, that inherits from String and has, additionally, some methods from class IO, so that it behaves both as a String and an IO object. You could even get a fileno out from it (if you do so, the contents will be written into a temporary file and ITS fileno will be returned to you). With it you could write things like this: require "StringIO" input = StringIO.new < Hugh > hgs@dmu.ac.uk \cle