From d835a87cc1afff63764b2b952cd397190c8623ab Mon Sep 17 00:00:00 2001 From: naruse Date: Thu, 21 Oct 2010 06:51:49 +0000 Subject: [PATCH] * io.c (rb_f_select): add correct rdoc. patched by Dave Thomas [ruby-core:32467] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ io.c | 22 ++++++++++++++++------ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 885bb7efe6..7b7fe1b4ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Oct 21 15:50:25 2010 NARUSE, Yui + + * io.c (rb_f_select): add correct rdoc. + patched by Dave Thomas [ruby-core:32467] + Thu Oct 21 15:42:01 2010 NARUSE, Yui * lib/net/telnet.rb (Net::Telnet#close): added. diff --git a/io.c b/io.c index 8838bba7e0..27c991834e 100644 --- a/io.c +++ b/io.c @@ -6071,7 +6071,7 @@ rb_io_putc(VALUE io, VALUE ch) * Equivalent to: * * $stdout.putc(int) - * + * * Refer to the documentation for IO#putc for important information regarding * multi-byte characters. */ @@ -7347,12 +7347,22 @@ select_end(VALUE arg) /* * call-seq: - * IO.select(read_array - * [, write_array - * [, error_array - * [, timeout]]] )-> array or nil + * [IO.]select(read_array [, write_array [, error_array [, timeout ]]]) -> array | nil * - * See Kernel#select. + * Performs a low-level select call, which waits for data + * to become available from input/output devices. The first three + * parameters are arrays of +IO+ objects or +nil+. The last is a + * timeout in seconds, which should be an +Integer+ or a +Float+. + * The call waits for data to become available for any of the +IO+ + * objects in _read_array_, for buffers to have cleared sufficiently to + * enable writing to any of the devices in _write_array_, or for an error + * to occur on the devices in _error_array_. If one or more of these + * conditions are met, the call returns a three-element array containing + * arrays of the +IO+ objects that were ready. Otherwise, if there is no + * change in status for _timeout_ seconds, the call returns +nil+. If all + * parameters are +nil+, the current thread sleeps forever. + * + * select( [STDIN], nil, nil, 1.5 ) */ static VALUE