ruby-changes:10366
From: akr <ko1@a...>
Date: Sat, 31 Jan 2009 14:23:03 +0900 (JST)
Subject: [ruby-changes:10366] Ruby:r21910 (trunk): rdoc update.
akr 2009-01-31 14:12:23 +0900 (Sat, 31 Jan 2009) New Revision: 21910 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21910 Log: rdoc update. Modified files: trunk/io.c Index: io.c =================================================================== --- io.c (revision 21909) +++ io.c (revision 21910) @@ -1899,6 +1899,17 @@ * The result may also be smaller than string.length (partial write). * The caller should care such errors and partial write. * + * # Creates a pipe. + * r, w = IO.pipe + * + * # write_nonblock writes only 65536 bytes and return 65536. + * # (The pipe size is 65536 bytes on this environment.) + * s = "a" * 100000 + * p w.write_nonblock(s) #=> 65536 + * + * # write_nonblock cannot write a byte and raise EWOULDBLOCK (EAGAIN). + * p w.write_nonblock("b") # Resource temporarily unavailable (Errno::EAGAIN) + * * If the write buffer is not empty, it is flushed at first. * * When write_nonblock raises EWOULDBLOCK, -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/