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 <<END
  example input for my class
  More of the same
  other stuff
  ...etc
  END

  puts "input='#{input}'"    # Behaves as String here
  lineno = 0
  
  while line = input.gets    # Behaves as IO object here
    print "#{lineno+=1}: #{line}\n"
  end

I had not released the class yet, as I didn't write appropiate
documentation yet. To speak the truth I had even forgot that I had
wrote that class :-(

If you are interested in, I could send you a .tgz file with that
class. If I have time I will complete the documentation and relase the
package to the community ...

(...)

> 	  Hugh
> 	  hgs / dmu.ac.uk

\cle