Skip to content

Commit 2beb05b

Browse files
apatnivnobu
authored andcommitted
Document mandatory require for using io/wait methods
1 parent 043cc93 commit 2beb05b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

ext/io/wait/wait.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ wait_for_single_fd(rb_io_t *fptr, int events, struct timeval *tv)
7777
*
7878
* Returns number of bytes that can be read without blocking.
7979
* Returns zero if no information available.
80+
*
81+
* You must require 'io/wait' to use this method.
8082
*/
8183

8284
static VALUE
@@ -122,6 +124,8 @@ io_wait_event(VALUE io, int event, VALUE timeout)
122124
* io.ready? -> true or false
123125
*
124126
* Returns +true+ if input available without blocking, or +false+.
127+
*
128+
* You must require 'io/wait' to use this method.
125129
*/
126130

127131
static VALUE
@@ -154,6 +158,8 @@ io_ready_p(VALUE io)
154158
* Waits until IO is readable and returns +true+, or
155159
* +false+ when times out.
156160
* Returns +true+ immediately when buffered data is available.
161+
*
162+
* You must require 'io/wait' to use this method.
157163
*/
158164

159165
static VALUE
@@ -193,6 +199,8 @@ io_wait_readable(int argc, VALUE *argv, VALUE io)
193199
*
194200
* Waits until IO is writable and returns +true+ or
195201
* +false+ when times out.
202+
*
203+
* You must require 'io/wait' to use this method.
196204
*/
197205
static VALUE
198206
io_wait_writable(int argc, VALUE *argv, VALUE io)
@@ -228,6 +236,8 @@ io_wait_writable(int argc, VALUE *argv, VALUE io)
228236
*
229237
* Waits until IO is priority and returns +true+ or
230238
* +false+ when times out.
239+
*
240+
* You must require 'io/wait' to use this method.
231241
*/
232242
static VALUE
233243
io_wait_priority(int argc, VALUE *argv, VALUE io)
@@ -295,6 +305,8 @@ wait_mode_sym(VALUE mode)
295305
*
296306
* Optional parameter +mode+ is one of +:read+, +:write+, or
297307
* +:read_write+.
308+
*
309+
* You must require 'io/wait' to use this method.
298310
*/
299311

300312
static VALUE

0 commit comments

Comments
 (0)