summaryrefslogtreecommitdiff
path: root/ext/io/console
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-12-10 10:08:43 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-12-10 16:06:11 +0900
commit09723b98f7a8db4ce6d22cd282525275154736fe (patch)
treeaf09c09fa5ed756b1c796bf3463b5d1dbc99d5e9 /ext/io/console
parent0c2787b9b29d839876ac68afbd6209a8407fcb30 (diff)
[ruby/io-console] Warn vtime option without intr flag
https://github.com/ruby/io-console/commit/499ff3de48
Diffstat (limited to 'ext/io/console')
-rw-r--r--ext/io/console/console.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/io/console/console.c b/ext/io/console/console.c
index e59284e4341..626d8d703dd 100644
--- a/ext/io/console/console.c
+++ b/ext/io/console/console.c
@@ -517,6 +517,9 @@ console_getch(int argc, VALUE *argv, VALUE io)
if (w < 0) rb_eof_error();
if (!(w & RB_WAITFD_IN)) return Qnil;
}
+ else {
+ rb_warning("vtime option ignored if intr flag is unset");
+ }
}
len = (int)rb_thread_io_blocking_region(nogvl_getch, wbuf, fptr->fd);
switch (len) {