Ruby: ask a password without echoing
require 'io/console'
print "Please insert your password:"
STDIN.noecho(&:gets)
Written by Luca Guidi
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#