Skip to content

Commit 1e98c93

Browse files
stomarnobu
authored andcommitted
[DOC] Note that IO#getpass returns a chomped string
IO#getpass uses String#chomp! on the read input line.
1 parent 8337028 commit 1e98c93

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/io/console/console.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1574,6 +1574,10 @@ str_chomp(VALUE str)
15741574
* Reads and returns a line without echo back.
15751575
* Prints +prompt+ unless it is +nil+.
15761576
*
1577+
* The newline character that terminates the
1578+
* read line is removed from the returned string,
1579+
* see String#chomp!.
1580+
*
15771581
* You must require 'io/console' to use this method.
15781582
*/
15791583
static VALUE

0 commit comments

Comments
 (0)