summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-21 06:51:49 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-21 06:51:49 +0000
commitd835a87cc1afff63764b2b952cd397190c8623ab (patch)
tree5ed0f57440a4245b3cd637a900c1edc858153b4d /io.c
parent0d5a81f497653d5ab5ea75591e900a951a825d81 (diff)
* 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
Diffstat (limited to 'io.c')
-rw-r--r--io.c24
1 files changed, 17 insertions, 7 deletions
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
- *
- * See <code>Kernel#select</code>.
+ * [IO.]select(read_array [, write_array [, error_array [, timeout ]]]) -> array | nil
+ *
+ * Performs a low-level <methodname>select</methodname> 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