5

Setup:

  • Bash
  • Ruby 1.9.2
  • highline (1.6.13)

Description:

I'm fairly used to highline with some other projects, but haven't used it in a few months. Now, on a fresh install on Ruby 1.9.2, it doesn't seem to allow prompts to be answered on the same line.

So previously I would see something like:

 require "highline/import"
 ask "What is your favorite color?"

And get:

 What is your favorite color? |

Now I see something like:

 What is your favorite color?
 |

Where the pipe (|) symbol is my terminal cursor.

Any ideas why this change has occurred?

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
wmarbut
  • 4,595
  • 7
  • 42
  • 72

1 Answers1

8

Put a space at the end of the question string, eg

ask "What is your favorite color? "
Tim Peters
  • 4,034
  • 2
  • 21
  • 27