From: Nobuyoshi Nakada Date: 2007-07-31T13:51:27+09:00 Subject: Re: Hiding user input Hi, At Tue, 31 Jul 2007 12:24:00 +0900, Ari Brown wrote in [ruby-talk:262575]: > Without Highline!!!!!!!! > Sorry, James, I love the library, but I need this to work over IO. Highline doesn't work over IO? > How can I hide user input (as they type) without highline? Am I able > to use blocks after gets()? > I'm hoping I can do something like this: > > name = gets.chomp {|let| let.echo = false} require 'io/console' name = STDIN.noecho {|i| i.gets}.chomp io/console would work on the platforms support termios, termio or sgtty, and Win32. -- Nobu Nakada