Rubyスクリプトでパスワード入力

io/consolerquireしてからIO#getpassを使う。

$ ri IO#getpass
= IO#getpass

(from ruby core)
------------------------------------------------------------------------
  io.getpass(prompt=nil)       -> string

------------------------------------------------------------------------

Reads and returns a line without echo back. Prints prompt unless it is
nil.

You must require 'io/console' to use this method.