From: "Joseph E. Savard" Date: 2010-07-30T06:34:37+09:00 Subject: Re: how to read password from keyboard c.echo=false; not needed... Only needs the c.echo='*' > > require 'rubygems' > require 'highline/import' > > pwd = ask("Enter your password: " ) {|c| c.echo=false; c.echo='*';} > > puts "the password=#{pwd}" > > >> From: Bruno Sousa >> Reply-To: >> Newsgroups: comp.lang.ruby >> Date: Fri, 30 Jul 2010 05:31:21 +0900 >> To: ruby-talk ML >> Subject: how to read password from keyboard >> >> Hi everyone! >> >> If I want to read a simple string from keyboard: >> simple_text = gets >> >> What if a password needs to be read from keyboard (commando line)? >> How do I mask it with asterisks? >> >> Regards, >> Bruno >> -- >> Posted via http://www.ruby-forum.com/. >> > >