summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2021-12-27 17:05:42 +1300
committerNARUSE, Yui <nurse@users.noreply.github.com>2022-01-31 15:35:55 +0900
commitaa3b2c81c8de2e70bd100e92436f15c03523eaf7 (patch)
treef63c09fe295e75f1c238b88d29ca2bce472a96e0
parent8e3bce0841497fc00ccdaf45f6583c25720a2d3f (diff)
Fix console.c usage of `rb_io_wait`.
-rw-r--r--ext/io/console/console.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/io/console/console.c b/ext/io/console/console.c
index 4c5f89f80d..dd84c51aa4 100644
--- a/ext/io/console/console.c
+++ b/ext/io/console/console.c
@@ -555,7 +555,7 @@ console_getch(int argc, VALUE *argv, VALUE io)
if (w < 0) rb_eof_error();
if (!(w & RB_WAITFD_IN)) return Qnil;
# else
- VALUE result = rb_io_wait(io, RUBY_IO_READABLE, timeout);
+ VALUE result = rb_io_wait(io, RB_INT2NUM(RUBY_IO_READABLE), timeout);
if (!RTEST(result)) return Qnil;
# endif
}