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

[ruby/io-console] Refined getch warnings

https://github.com/ruby/io-console/commit/f84e6abcce
This commit is contained in:
Nobuyoshi Nakada 2020-10-10 22:11:01 +09:00
parent 37259e878f
commit 71428ac264

View file

@ -544,7 +544,7 @@ console_getch(int argc, VALUE *argv, VALUE io)
if (optp->vtime) break;
/* fallthru */
default:
rb_warning("min option ignored");
rb_warning("min option larger than 1 ignored");
}
if (optp->intr) {
# ifndef HAVE_RB_IO_WAIT
@ -556,8 +556,8 @@ console_getch(int argc, VALUE *argv, VALUE io)
if (result == Qfalse) return Qnil;
# endif
}
else {
rb_warning("vtime option ignored if intr flag is unset");
else if (optp->vtime) {
rb_warning("Non-zero vtime option ignored if intr flag is unset");
}
}
len = (int)(VALUE)rb_thread_call_without_gvl(nogvl_getch, wbuf, RUBY_UBF_IO, 0);