1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/io-console] Warn vtime option without intr flag

499ff3de48
This commit is contained in:
Nobuyoshi Nakada 2019-12-10 10:08:43 +09:00
parent 0c2787b9b2
commit 09723b98f7
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -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) {