End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
IO::generic_readable#getpass
io.getpass(prompt=nil) → string
ext/io/console/console.c
View on GitHub ↗
static VALUE
io_getpass(int argc, VALUE *argv, VALUE io)
{
VALUE str;
rb_check_arity(argc, 0, 1);
prompt(argc, argv, io);
str = str_chomp(rb_funcallv(io, id_gets, 0, 0));
puts_call(io);
return str;
}
See IO#getpass.