From: Tanaka Akira Date: 2004-07-21T18:56:01+09:00 Subject: Re: sysread and buffered I/O In article <189-1205065002.20040721185353@soyabean.com.au>, Gavin Sinclair writes: > Tanaka, can you please give a brief description of the method (assume > I know nothing about advanced I/O), and I'll suggest a name. Of > course, other people will too. [ruby-dev:23247] contains a patch including RDoc comment in English. /* * call-seq: * ios.readpartial(integer [, buffer]) => string, buffer, or nil * * Reads at most integer bytes from the I/O stream but * it blocks only if ios has no data immediately available. * If the optional buffer argument is present, * it must reference a String, which will receive the data. * It raises EOFError on end of file. * * STDIN.readpartial(4096) #=> "Data immediately available" */ (The behavior on EOF is modified.) -- Tanaka Akira