From: Yaser Sulaiman Date: 2008-12-21T16:14:13+09:00 Subject: Re: Non-newline gets ------=_Part_56613_3329325.1229844152053 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Don't use puts, use print instead. print "Welcome. Enter username: " Regards, Yaser Sulaiman On Sun, Dec 21, 2008 at 9:58 AM, Michael Boutros wrote: > Hello, > > I'm writing a CLI and I want to get some additional information after I > first run the script, namely the username. Take a look. > > -- code > puts "Welcome. Enter username: " > username = gets.strip > -- /code > > That works fine, but the issue is that it takes the username on a new > line, like so: > > $ ruby script.rb > Welcome. Enter username: > michaelboutros > > How can I make it so that the username can be entered on the same line? > > Thanks, > Michael Boutros > -- > Posted via http://www.ruby-forum.com/. > > ------=_Part_56613_3329325.1229844152053--