In article <40FE101D.90603 / hypermetrics.com>,
  Hal Fulton <hal9000 / hypermetrics.com> writes:

> I've been playing with telnet (and ssh) and I've been
> pondering something.
>
> Mixing sysread with buffered I/O is a Bad Thing (TM).
>
> In fact, when I try to treat a telnet object as a socket
> (which it is) and read from it using gets(), it crashes.
> Not surprising.

I proposed stdio friendly sysread like method: readpartial.
[ruby-dev:23247] [ruby-talk:96220]

However it is not incorporated into ruby just because the name is not
good enough.  Currently I think readchunk is better, though.

If net/telnet use readchunk instead of sysread, gets and other stdio
methods can be used as usual without buffering problem, maybe.

> So I was wondering: Would it make sense to have something like
> "class SysIO < IO" where SysIO would do its own internal buffering
> (and do everything in terms of sysread/-write at the lowest level)?
>
> It would be a little like wheel-reinventing, but it would provide
> an IO object on which these operations could be mixed.
>
> Does this make sense or not?

The new class SysIO is not required.
I think matz will accept stdio-less implementation for IO.
-- 
Tanaka Akira