Skip to content

Failing "-x" command line option #4536

@donv

Description

@donv

Given a script mixed_script:

#!/bin/sh
echo 'bash part'
'exec' "ruby" '-x' "$0" "$@"
#!ruby
puts 'ruby part'

Run with

./mixed_script

With MRI installed as current Ruby this produces

bash part
ruby part

With JRuby this produces

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]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions