Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: JRuby 1.1RC2
-
Component/s: Interpreter
-
Labels:None
-
Environment:bash 2.03
tested in Solaris 8
-
Patch Submitted:Yes
-
Number of attachments :
Description
jruby bash script fails with bash 2.03:
$ jruby -v
/export/home/cacti/jruby-1.1b1/bin/jruby: while: command not found
/export/home/cacti/jruby-1.1b1/bin/jruby: line 119: syntax error near unexpected token `do'
/export/home/cacti/jruby-1.1b1/bin/jruby: line 119: `do'
The problem are these two empty array declarations:
java_args=()
ruby_args=()
This seems to be a bash 2.03 bug, but I haven't found any information reporting it.
I have found a workaround to this issue. Empty arrays can be declared this way:
declare -a java_args
declare -a ruby_args
So now jruby script works fine in Solaris 8.
Note 1: bash-2.03 is the default bash shell in Solaris 8
Note 2: I don't know if this diff can be used as a patch:
$ diff jruby jruby.orig
116,117c116,117
< declare -a java_args
< declare -a ruby_args
—
> java_args=()
> ruby_args=()
I think It's same problem with jruby-1967. Those bugs must be join (I think)