-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HighLine.new.ask("Q?"){|q| q.overwrite = true} errors with version 1.6.5 #17
Comments
It looks like the issue occurs within get_response after the while loop gathers the input here:
Something's going on with ERASE_LINE it seems that is causing execution of get_response to abort and for ask's line: Aaron out. |
Ah, it appears the ERASE_LINE constant is missing. I can't find it anywhere. That would definitely be a problem. |
Verified. Whenever highline.rb attempts to reference ERASE_LINE, exception "uninitialized constant Object::ERASE_LINE" is being raised. |
For now so HighLine would work for me, I just replaced ERASE_LINE with HighLine.Style('erase_line').code in two places. And once again it works for me. |
Closing this issue as issue 18 (pull request) has one possible solution to this bug (and refers back to this issue). |
Running gem version 1.6.5 under Ruby 1.9.2 I encounter this:
require 'highline'
answer = HighLine.new.ask("Password:"){|q| q.overwrite = true ; q.echo = '*'}
Result:
Password:
**********You must enter a valid HighLine::String.
The code worked just fine in previous versions, returning the user's input. If I omit the q.overwrite=true part, it works. So something has changed in the overwrite code path that breaks HighLine.
Thanks.
Aaron Gifford
The text was updated successfully, but these errors were encountered: