# Unexpected behaviour of Highline metod ask!

**URL:** <https://www.ruby-forum.com/t/unexpected-behaviour-of-highline-metod-ask/170403>\
**Category:** Ruby\
**Created:** [June 17, 2009, 7:10am UTC](https://www.ruby-forum.com/t/unexpected-behaviour-of-highline-metod-ask/170403 "2009-06-17T07:10:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Buda\_SampS\_Nada](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ecae2f/32.png) [@Buda\_SampS\_Nada](https://www.ruby-forum.com/u/Buda_SampS_Nada)\
**Post date:** [June 17, 2009, 7:10am UTC](https://www.ruby-forum.com/t/unexpected-behaviour-of-highline-metod-ask/170403/1 "2009-06-17T07:10:34Z")

</div>

Hi!

I am having an unexpected behaviour when the follwoing code is  
executed:

pass = ask("Enter your password: ") { |q| q.echo = “x” }

As I enter characters there is not instantenious echo of the “x”  
character. Instead, nothing is echoed until is hit when all  
“x” characters do appear. Is this the intention here. For would  
think that “x” characters should after each press of any character.

I would apprecite a commnet.

Bud M

---

<div class="post-metadata">

**Author:** ![Buda\_SampS\_Nada](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ecae2f/32.png) [@Buda\_SampS\_Nada](https://www.ruby-forum.com/u/Buda_SampS_Nada)\
**Post date:** [June 17, 2009, 9:41am UTC](https://www.ruby-forum.com/t/unexpected-behaviour-of-highline-metod-ask/170403/2 "2009-06-17T09:41:14Z")

</div>

In case you don’t get a better answer (I’ve experiences with highline,  
but not with ‘echo’):

If you are on Windows, maybe it does not work.

If you are on Linux/Unix, do you have everything from the  
documentation:

"  
echo:  
This requires HighLine’s character reader. See the character attribute  
for details.

Note: When using HighLine to manage echo on Unix based systems, we  
recommend installing the termios gem. Without it, it’s possible to  
type fast enough to have letters still show up (when reading character  
by character only).  
"

-Axel

---

<div class="post-metadata">

**Author:** ![Buda\_SampS\_Nada](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ecae2f/32.png) [@Buda\_SampS\_Nada](https://www.ruby-forum.com/u/Buda_SampS_Nada)\
**Post date:** [June 17, 2009, 4:47pm UTC](https://www.ruby-forum.com/t/unexpected-behaviour-of-highline-metod-ask/170403/3 "2009-06-17T16:47:27Z")

</div>

On Jun 17, 2009, at 12:10 AM, Buda & Nada wrote:

> Hi!

Hello.

> I would apprecite a commnet.  
> As Axel pointed out, your platform may matter in this case. Can you  
> tell us what you are using?

James Edward G. II
