print "Enter your password: " pass = STDIN.noecho(&:gets) puts "Your password is #{pass}!"
CONCLUSION:
Enter your password: input.rb:2:in `<main>': undefined method `noecho' for #<IO:<STDIN>> (NoMethodError)
At first
require 'io/console'
later Ruby 1.9.3