0

Using Highline v1.6.19

When I run the following Ruby program:

require 'highline'

stdin = HighLine.new($stdin, $stdout)
stdin.ask("1 enter password: ") { |q| q.echo = false }
stdin.ask "2 enter something else: "
stdin.ask("3 enter password: ") { |q| q.echo = false }
stdin.ask "4 enter something else: "

The output looks like this while asking the first three questions:

1 enter password:
2 enter something else: whatever
3 enter password:

Then it asks for fourth time, and instead of placing the 4th line after the third, it overwrites the previous output from the second line:

1 enter password:
4 enter something else: whatever
3 enter password:

Any idea why or what to do about it?

Joshua Cheek
  • 30,436
  • 16
  • 74
  • 83

1 Answers1

0

This is the output I get:

1 enter password: 
2 enter something else: hello
3 enter password: 
4 enter something else: goodbye

What os are you using?

7stud
  • 46,922
  • 14
  • 101
  • 127
  • Mac OSX (10.8.2), I get this on iTerm2 and Terminal. – Joshua Cheek Jul 06 '13 at 16:00
  • Had a friend try, and it worked correctly for him, too. Any idea why mine would be off? :/ My readline was installed with homebrew, but it says it's keg only, not sure what else it could be. – Joshua Cheek Jul 09 '13 at 14:08