LoginSignup
3
3

More than 5 years have passed since last update.

標準入力時に入力内容を表示させない方法

Last updated at Posted at 2013-01-29
print 'password: '
system "stty -echo"
password = $stdin.gets.chop
system "stty echo"

※2/2 追記

すでに既出のTipsであり、もっと適切な方法が以下に紹介されておりますので、そちらを参照して頂くことをオススメします!
http://qiita.com/items/88194612bb0fa705e39d

3
3
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3