diff --git a/ChangeLog b/ChangeLog index 2a7f7a1de2..f228108e44 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu May 21 10:51:54 2015 Jake Worth + + * io.c (rb_f_select): [DOC] Fixes for grammar and style. + [Fix GH-906] + Thu May 21 08:25:19 2015 Eric Wong * variable.c (Init_var_tables): init generic_iv_tbl diff --git a/io.c b/io.c index 56ba082065..2fcc25a22d 100644 --- a/io.c +++ b/io.c @@ -8688,8 +8688,8 @@ rb_io_advise(int argc, VALUE *argv, VALUE io) * IO.select(read_array [, write_array [, error_array [, timeout]]]) -> array or nil * * Calls select(2) system call. - * It monitors given arrays of IO objects, waits one or more - * of IO objects ready for reading, are ready for writing, + * It monitors given arrays of IO objects, waits until one or more + * of IO objects are ready for reading, are ready for writing, * and have pending exceptions respectively, and returns an array that * contains arrays of those IO objects. It will return nil * if optional timeout value is given and no IO object @@ -8697,13 +8697,13 @@ rb_io_advise(int argc, VALUE *argv, VALUE io) * * IO.select peeks the buffer of IO objects for testing readability. * If the IO buffer is not empty, - * IO.select immediately notify readability. - * This "peek" is only happen for IO objects. - * It is not happen for IO-like objects such as OpenSSL::SSL::SSLSocket. + * IO.select immediately notifies readability. + * This "peek" only happens for IO objects. + * It does not happen for IO-like objects such as OpenSSL::SSL::SSLSocket. * * The best way to use IO.select is invoking it * after nonblocking methods such as read_nonblock, write_nonblock, etc. - * The methods raises an exception which is extended by + * The methods raise an exception which is extended by * IO::WaitReadable or IO::WaitWritable. * The modules notify how the caller should wait with IO.select. * If IO::WaitReadable is raised, the caller should wait for reading. @@ -8731,37 +8731,37 @@ rb_io_advise(int argc, VALUE *argv, VALUE io) * This means that readability notified by IO.select doesn't mean * readability from OpenSSL::SSL::SSLSocket object. * - * Most possible situation is OpenSSL::SSL::SSLSocket buffers some data. + * The most likely situation is that OpenSSL::SSL::SSLSocket buffers some data. * IO.select doesn't see the buffer. * So IO.select can block when OpenSSL::SSL::SSLSocket#readpartial doesn't block. * - * However several more complicated situation exists. + * However, several more complicated situations exist. * * SSL is a protocol which is sequence of records. - * The record consists multiple bytes. + * The record consists of multiple bytes. * So, the remote side of SSL sends a partial record, * IO.select notifies readability but * OpenSSL::SSL::SSLSocket cannot decrypt a byte and * OpenSSL::SSL::SSLSocket#readpartial will blocks. * * Also, the remote side can request SSL renegotiation which forces - * the local SSL engine writes some data. + * the local SSL engine to write some data. * This means OpenSSL::SSL::SSLSocket#readpartial may * invoke write system call and it can block. - * In such situation, OpenSSL::SSL::SSLSocket#read_nonblock + * In such a situation, OpenSSL::SSL::SSLSocket#read_nonblock * raises IO::WaitWritable instead of blocking. * So, the caller should wait for ready for writability as above example. * * The combination of nonblocking methods and IO.select is * also useful for streams such as tty, pipe socket socket when - * multiple process read form a stream. + * multiple processes read from a stream. * - * Finally, Linux kernel developers doesn't guarantee that + * Finally, Linux kernel developers don't guarantee that * readability of select(2) means readability of following read(2) even - * for single process. + * for a single process. * See select(2) manual on GNU/Linux system. * - * Invoking IO.select before IO#readpartial works well in usual. + * Invoking IO.select before IO#readpartial works well as usual. * However it is not the best way to use IO.select. * * The writability notified by select(2) doesn't show