[前][次][番号順一覧][スレッド一覧]

ruby-changes:64743

From: Marcus <ko1@a...>
Date: Tue, 5 Jan 2021 13:02:30 +0900 (JST)
Subject: [ruby-changes:64743] 451b456051 (master): [ruby/io-console] [DOC] Note that IO#getpass returns a chomped string

https://git.ruby-lang.org/ruby.git/commit/?id=451b456051

From 451b45605161a801e8a1e3c53e02d74de82a096a Mon Sep 17 00:00:00 2001
From: Marcus Stollsteimer <sto.mar@w...>
Date: Wed, 23 Dec 2020 17:41:16 +0100
Subject: [ruby/io-console] [DOC] Note that IO#getpass returns a chomped string

IO#getpass uses String#chomp! on the read input line.

https://github.com/ruby/io-console/commit/1e98c93bc8

diff --git a/ext/io/console/console.c b/ext/io/console/console.c
index ff4df73..1fb1609 100644
--- a/ext/io/console/console.c
+++ b/ext/io/console/console.c
@@ -1574,6 +1574,10 @@ str_chomp(VALUE str) https://github.com/ruby/ruby/blob/trunk/ext/io/console/console.c#L1574
  * Reads and returns a line without echo back.
  * Prints +prompt+ unless it is +nil+.
  *
+ * The newline character that terminates the
+ * read line is removed from the returned string,
+ * see String#chomp!.
+ *
  * You must require 'io/console' to use this method.
  */
 static VALUE
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]