You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bash part
jruby: no Ruby script found in input (LoadError)
Environment
Darwin Gratass.local 16.4.0 Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64 x86_64
jruby 9.1.8.0 (2.3.1) 2017-03-06 90fc7ab Java HotSpot(TM) 64-Bit Server VM 25.112-b16 on 1.8.0_112-b16 +jit [darwin-x86_64]
jruby 9.1.5.0 (2.3.1) 2016-09-07 036ce39 Java HotSpot(TM) 64-Bit Server VM 25.112-b16 on 1.8.0_112-b16 +jit [darwin-x86_64]
jruby 1.7.26 (1.9.3p551) 2016-08-26 69763b8 on Java HotSpot(TM) 64-Bit Server VM 1.8.0_112-b16 +jit [darwin-x86_64]
The text was updated successfully, but these errors were encountered:
I also just stumbled upon this (exactly two years later 😁).
The option probably broke with the fix for #3294: In the first pass doProcessArguments, parseShebangOptions, and finally setHasShebangLine was called, so hasShebangLine returned true afterwards. There is event a test for it, but it seems it is not run?
I have a fix in the making, will open a PR if it is finished.
The -x option has been broken since [1], as parseShebangOptions is no
longer run, which is responsible for calling setHasShebangLine. As this
is no longer done, hasShebangLine always returns false, even if there is
a valid shebang.
The fix is to remove the check at this location and move it into the
findScript function, which already searches for the ruby shebang.
[1]: 9e2d6dcFix: jruby#4536
Given a script
mixed_script
:Run with
With MRI installed as current Ruby this produces
With JRuby this produces
Environment
Darwin Gratass.local 16.4.0 Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64 x86_64
jruby 9.1.8.0 (2.3.1) 2017-03-06 90fc7ab Java HotSpot(TM) 64-Bit Server VM 25.112-b16 on 1.8.0_112-b16 +jit [darwin-x86_64]
jruby 9.1.5.0 (2.3.1) 2016-09-07 036ce39 Java HotSpot(TM) 64-Bit Server VM 25.112-b16 on 1.8.0_112-b16 +jit [darwin-x86_64]
jruby 1.7.26 (1.9.3p551) 2016-08-26 69763b8 on Java HotSpot(TM) 64-Bit Server VM 1.8.0_112-b16 +jit [darwin-x86_64]
The text was updated successfully, but these errors were encountered: