From e7b573e5768956b110c25b2cab02a889f2e8cc8e Mon Sep 17 00:00:00 2001 From: apatniv Date: Sun, 23 Jan 2022 21:31:29 -0500 Subject: [ruby/io-wait] Document mandatory require for using io/wait methods https://github.com/ruby/io-wait/commit/2beb05bd48 --- ext/io/wait/wait.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ext/io/wait/wait.c b/ext/io/wait/wait.c index 8f0d16e168..74a1b49ee5 100644 --- a/ext/io/wait/wait.c +++ b/ext/io/wait/wait.c @@ -77,6 +77,8 @@ wait_for_single_fd(rb_io_t *fptr, int events, struct timeval *tv) * * Returns number of bytes that can be read without blocking. * Returns zero if no information available. + * + * You must require 'io/wait' to use this method. */ static VALUE @@ -122,6 +124,8 @@ io_wait_event(VALUE io, int event, VALUE timeout) * io.ready? -> true or false * * Returns +true+ if input available without blocking, or +false+. + * + * You must require 'io/wait' to use this method. */ static VALUE @@ -154,6 +158,8 @@ io_ready_p(VALUE io) * Waits until IO is readable and returns +true+, or * +false+ when times out. * Returns +true+ immediately when buffered data is available. + * + * You must require 'io/wait' to use this method. */ static VALUE @@ -193,6 +199,8 @@ io_wait_readable(int argc, VALUE *argv, VALUE io) * * Waits until IO is writable and returns +true+ or * +false+ when times out. + * + * You must require 'io/wait' to use this method. */ static VALUE io_wait_writable(int argc, VALUE *argv, VALUE io) @@ -228,6 +236,8 @@ io_wait_writable(int argc, VALUE *argv, VALUE io) * * Waits until IO is priority and returns +true+ or * +false+ when times out. + * + * You must require 'io/wait' to use this method. */ static VALUE io_wait_priority(int argc, VALUE *argv, VALUE io) @@ -295,6 +305,8 @@ wait_mode_sym(VALUE mode) * * Optional parameter +mode+ is one of +:read+, +:write+, or * +:read_write+. + * + * You must require 'io/wait' to use this method. */ static VALUE -- cgit v1.2.3