One can also use core ruby.
$ ri IO.noecho
(from ruby core)
------------------------------------------------------------------------------
io.noecho {|io| }
------------------------------------------------------------------------------
Yields self with disabling echo back.
STDIN.noecho(&:gets)
will read and return a line without echo back.
For 1.9.3 (and above), this requires you adding require 'io/console'
to your code.
require 'io/console'
text = STDIN.noecho(&:gets)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…