Comments (11)
Can you try it outside of a console (inside a script file that you feed to the JRuby interpreter) and report back if you are seeing the same thing?
from highline.
Andras-rMBP:~ andras$ jruby highline.rb
Ignored
Ambiguous choice. Please choose one of ["1", "2", "3", :ruby, :python, :perl].
? Ignored
Ambiguous choice. Please choose one of ["1", "2", "3", :ruby, :python, :perl].
? Ignored1
Good choice!
thanks!
from highline.
Good to know. Thanks.
This definitely needs fixing.
from highline.
I have the same issue. Prints ignored but menu still responds to enter key.
jruby 1.7.1 (1.9.3p327) 2012-12-03 30a153b on OpenJDK 64-Bit Server VM 1.6.0_24-b24 [linux-amd64]
from highline.
I've tracked this down to the code here: https://github.com/JEG2/highline/blob/master/lib/highline.rb#L253
The comment in the code seems to indicate that it's attempting to avoid a JRUBY bug however the logic means that no @question is displayed other than "Ignored" when used with highline's default settings. I noticed that when I switch to using readline=true on my menu AND I hack this line https://github.com/JEG2/highline/blob/master/lib/highline.rb#L253 to remove the JRUBY check that the choices are displayed. This leaves me with a few more questions:
Can someone who's familiar with how the options work for echo and readline inspect this logic on line 253 to see if it makes sense? I'd like to see it deal with JRUBY+readline but at the same time not cause issues with the echo stuff.
Is there a way to globally default to using readline for ALL questions? IE: even the alias to "agree("question?")" default to readline=false and this causes the question not to display the prompt in jruby.
from highline.
I didn't write that particular check, so I'm afraid I don't remember what the logic is doing there.
I do plan to look into this next time I find the time for a HighLine bug fix. Obviously, several issues have built up.
from highline.
With #67 applied, many of the tests that fail on JRuby 1.7.3 seem to be demonstrating some variant of this problem.
from highline.
+1 having same issue on JRuby 1.7.2 on Mountain Lion
from highline.
+1 - This is a blocker for me as I package using Warbler. Unfortunately i'm not upto speed on the intricacies of JRuby and the CLI but i'll have a look anyway.
from highline.
Hi @andlaz and all,
We are trying to "regain" JRuby compatibilitty at this PR #149
I've tested your code on my machine, a mac os x with jruby 1.7.20 (1.9.3p551) 2015-05-04 3086e6a on Java HotSpot(TM) 64-Bit Server VM 1.6.0_65-b14-462-11M4609 +jit [darwin-x86_64]
... and it's working fine.
Could you confirm if it's fixed so we could close this issue?
from highline.
Closing as it's fixed.
from highline.
Related Issues (20)
- Proc validation displays ruby object on invalid HOT 8
- Incosistent behavior when ask with a validator and readline=true HOT 9
- undefined method 'default_instance' HOT 3
- Default Highline Example on GithubGives Error HOT 5
- HighLine Terminal::IOConsole#restore_mode does not work with StringIO HOT 3
- System extensions depend on now-internalized JRuby dependencies HOT 14
- consider exposing Readline.completion_proc via HighLine::Question#selection HOT 3
- default value has to be a string HOT 14
- Ctrl-C improperly handled when q.echo = false HOT 6
- Issues with echo: false and not on TTY HOT 7
- Can't get terminal_size HOT 11
- echo=false or echo='*' requires extra character after enter on Windows HOT 6
- Possible to accept multiple selections with `.in` and `.default`? HOT 5
- test failing when ruby is built against libedit instead of readline HOT 3
- Have to set convert type in order for `.in` to work with array
- 2.1.0 was released, but tag is missing in repository HOT 2
- Make Highline Ruby 3.3 and reline compatible HOT 1
- Update tests for Reline (as the substitute of Readline)
- Add `abbrev` to gemspec HOT 2
- `ask()` causes `Readline`-related error on Ruby 3.3 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from highline.