> I had to put together an input stream on astring in an hour.  
> Your OutputShell works well, but I did not write a mirror 
> InputShell because it would have had to rely on reading one 
> byte at a time.  

Yes InputShell probably works fine, if you write your client-code with it in mind, but I sincerely doubt (as a matter of fact I know it wont) that it will work as a drop-in replacement for an instance of IO in existing code that reads from a stream, and that should be a goal. The code might call kind_of?(IO), it might use $_. It might rely on some specific behaviour regarding EOF. Bottom line, the implementation should be part of ruby, and it might make sense to break IO apart, so programmers wont inadvertently use kind_of?(IO), when they should (at most!) use kind_of?(InputStream).

Cheers,

Thomas