mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 13:34:17 +02:00
[ruby/io-console] [DOC] IO::console.getpass usage example
There were no clear example of this very useful method's usage anywhere
in the IO or IO::Console docs, which was a shame.
4d324586a8
This commit is contained in:
parent
ad2bad4ab4
commit
43802a088e
1 changed files with 6 additions and 0 deletions
|
@ -1578,6 +1578,12 @@ str_chomp(VALUE str)
|
||||||
* see String#chomp!.
|
* see String#chomp!.
|
||||||
*
|
*
|
||||||
* You must require 'io/console' to use this method.
|
* You must require 'io/console' to use this method.
|
||||||
|
*
|
||||||
|
* require 'io/console'
|
||||||
|
* IO::console.getpass("Enter password: ")
|
||||||
|
* Enter password:
|
||||||
|
* # => "mypassword"
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
static VALUE
|
static VALUE
|
||||||
console_getpass(int argc, VALUE *argv, VALUE io)
|
console_getpass(int argc, VALUE *argv, VALUE io)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue