jruby.sh does not process quoted arguments properly
---------------------------------------------------
Key: JRUBY-5197
URL: http://jira.codehaus.org/browse/JRUBY-5197
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.6
Reporter: Charles Oliver Nutter
Assignee: Thomas E Enebo
We recently added bin/jruby.sh for folks on platforms where bash is unavailable
or hard to get. Unfortunately, the script does not properly preserve quoted
arguments.
{noformat}
~/projects/jruby ➔ bin/jruby.sh -e 'require "irb"'
-e:1:in `require': wrong # of arguments(0 for 1) (ArgumentError)
from -e:1
{noformat}
The problem is that the command line arguments are getting rejiggered by the
script into:
{noformat}
-e require "irb"
{noformat}
The source is this part of the jruby.sh script:
{noformat}
# Match switches that take an argument
-C|-e|-I|-S) ruby_args="${ruby_args} $1 $2"; shift ;;
{noformat}
Because it is interpolating the strings rather than doing something else (I
don't know what, hence this bug) the outer quotes are getting stripped away,
breaking the original argument.
This makes the jruby.sh script fail for any invocations that pass quoted
arguments.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email