Skip to content

Commit

Permalink
[ruby/io-console] Refined getch warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Oct 10, 2020
1 parent 37259e8 commit 71428ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ext/io/console/console.c
Expand Up @@ -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
Expand All @@ -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);
Expand Down

0 comments on commit 71428ac

Please sign in to comment.