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

headius opened this Issue Jan 5, 2014 · 1 comment


None yet
2 participants

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 ( 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

Disable gems for -0 test since it interferes with FFI logic.
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 milestone Feb 17, 2017


This comment has been minimized.

Show comment
Hide comment

enebo Feb 17, 2017


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


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