-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels