summaryrefslogtreecommitdiff
path: root/ext/io
diff options
context:
space:
mode:
authorMarcus Stollsteimer <sto.mar@web.de>2020-12-23 17:41:16 +0100
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-01-05 12:59:53 +0900
commit451b45605161a801e8a1e3c53e02d74de82a096a (patch)
tree89b103b210416314e5328ca224d8303f36db6ee4 /ext/io
parent3adf84a0790aa2edb9e6c121e1e1e223cc7c0bbd (diff)
[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
Diffstat (limited to 'ext/io')
-rw-r--r--ext/io/console/console.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/io/console/console.c b/ext/io/console/console.c
index ff4df73693..1fb1609b4d 100644
--- a/ext/io/console/console.c
+++ b/ext/io/console/console.c
@@ -1574,6 +1574,10 @@ str_chomp(VALUE str)
* 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