JEG2/highline — Issue #16: Backspace not working
Author: cfbrobak
Created: 2011-11-07 07:04:32+00:00
State: open

Environment:

- jruby 1.6.5 (ruby-1.8.7-p330) (2011-10-25 9dcd388) (Java HotSpot(TM) Client VM 1.6.0_21) [Windows XP-x86-java]
- highline (1.6.5)

Scenario:

irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'highline/import'
=> true
irb(main):003:0> ask("Password: ") { |q| q.echo = "*" }
Password: *****
=> "12345"
irb(main):004:0> ask("Password: ") { |q| q.echo = "*" }
Password: *****You must enter a valid HighLine::String.
?
=> ""

Line 3 prompts for a password and "12345" is entered. It works as expected.
Line 4 prompts for a password and "12345" followed by a "backspace" is entered. Highline responds with an error "You must enter a valid HighLine::String".

Claus