Skip to content
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

io/console and/or FFI do not load right with alternative -0 separator #1381

Closed
headius opened this issue Jan 5, 2014 · 1 comment
Closed

io/console and/or FFI do not load right with alternative -0 separator #1381

headius opened this issue Jan 5, 2014 · 1 comment
Milestone

Comments

@headius
Copy link
Member

@headius headius commented Jan 5, 2014

The -0 flag specifies a record separator to use globally. If specified as in test/test_command_line_switches.rb#test_dash_0_splits_records it can interfere with loading either io/console (loaded by RubyGems), FFI, or both.

A warning results because it fails to load properly, and if verbose is specified you get an additional warning:

system ~/projects/jruby $ echo '1,2,3' | jruby -054 -n -e 'puts $_ + " "'
io/console on JRuby shells out to stty for most operations,
system ~/projects/jruby $ echo '1,2,3' | jruby -054 -v -n -e 'puts $_ + " "'
jruby 9000.dev (2.1.0.dev) 2014-01-05 26a7f4c on Java HotSpot(TM) 64-Bit Server VM 1.6.0_65-b14-462-11M4609 [darwin-x86_64]
failed to load native console support: unable to resolve type 'char
rbx.platform.typedef.__uint8_t',io/console on JRuby shells out to stty for most operations,

Unusually, this does not appear to break on Java 7 or 8, so we may be falling back on some 7/8 logic when FFI fails that does not require shelling out.

I'm fixing the -0 test, but the issue loading RubyGems with -0 remains. May not be a high priority, since I'm not sure many folks use -0.

headius added a commit that referenced this issue Jan 5, 2014
RubyGems loads io/console, which we implement using FFI. Either
that console impl or FFI itself do not appear to load right.

See #1381
@enebo enebo added this to the JRuby 9.1.8.0 milestone Feb 17, 2017
@enebo
Copy link
Member

@enebo enebo commented Feb 17, 2017

This seems to have been changed and thus fixed. 9k seems to work now.

@enebo enebo closed this Feb 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.