ruby-changes:63316
From: Nobuyoshi <ko1@a...>
Date: Sun, 11 Oct 2020 02:01:07 +0900 (JST)
Subject: [ruby-changes:63316] 71428ac264 (master): [ruby/io-console] Refined getch warnings
https://git.ruby-lang.org/ruby.git/commit/?id=71428ac264 From 71428ac2645400c02b0ee56b0ff7021542b9616f Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sat, 10 Oct 2020 22:11:01 +0900 Subject: [ruby/io-console] Refined getch warnings https://github.com/ruby/io-console/commit/f84e6abcce diff --git a/ext/io/console/console.c b/ext/io/console/console.c index 7d5181c..ff4df73 100644 --- a/ext/io/console/console.c +++ b/ext/io/console/console.c @@ -544,7 +544,7 @@ console_getch(int argc, VALUE *argv, VALUE io) https://github.com/ruby/ruby/blob/trunk/ext/io/console/console.c#L544 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) https://github.com/ruby/ruby/blob/trunk/ext/io/console/console.c#L556 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); -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/