Skip to content

Commit

Permalink
Showing 2 changed files with 20 additions and 12 deletions.
19 changes: 13 additions & 6 deletions bin/jruby.bash
Original file line number Diff line number Diff line change
@@ -146,12 +146,6 @@ for j in "$JRUBY_HOME"/lib/jruby.jar "$JRUBY_HOME"/lib/jruby-complete.jar; do
JRUBY_ALREADY_ADDED=true
done

# The Truffle jar always needs to be on the boot classpath, if it exists, so
# that the VM can substitute classes.
if [ -e "$JRUBY_HOME/lib/jruby-truffle.jar" ]; then
JRUBY_CP="$JRUBY_CP$CP_DELIMITER$JRUBY_HOME/lib/jruby-truffle.jar"
fi

if $cygwin; then
JRUBY_CP=`cygpath -p -w "$JRUBY_CP"`
fi
@@ -167,6 +161,9 @@ else
if [ "$j" == "$JRUBY_HOME"/lib/jruby.jar ]; then
continue
fi
if [ "$j" == "$JRUBY_HOME"/lib/jruby-truffle.jar ]; then
continue
fi
if [ "$j" == "$JRUBY_HOME"/lib/jruby-complete.jar ]; then
continue
fi
@@ -257,6 +254,10 @@ do
-X*\.\.\.|-X*\?)
ruby_args=("${ruby_args[@]}" "$1") ;;
# Match -Xa.b.c=d to translate to -Da.b.c=d as a java option
-X+T)
JRUBY_CP="$JRUBY_CP$CP_DELIMITER$JRUBY_HOME/lib/jruby-truffle.jar"
ruby_args=("${ruby_args[@]}" "-X+T")
;;
-X*)
val=${1:2}
if expr "$val" : '.*[.]' > /dev/null; then
@@ -411,6 +412,12 @@ else

exit $JRUBY_STATUS
else
echo exec "$JAVACMD" $JAVA_OPTS "$JFFI_OPTS" "${java_args[@]}" -Xbootclasspath/a:"$JRUBY_CP" -classpath "$CP$CP_DELIMITER$CLASSPATH" \
"-Djruby.home=$JRUBY_HOME" \
"-Djruby.lib=$JRUBY_HOME/lib" -Djruby.script=jruby \
"-Djruby.shell=$JRUBY_SHELL" \
$java_class $mode "$@"

exec "$JAVACMD" $JAVA_OPTS "$JFFI_OPTS" "${java_args[@]}" -Xbootclasspath/a:"$JRUBY_CP" -classpath "$CP$CP_DELIMITER$CLASSPATH" \
"-Djruby.home=$JRUBY_HOME" \
"-Djruby.lib=$JRUBY_HOME/lib" -Djruby.script=jruby \
13 changes: 7 additions & 6 deletions bin/jruby.sh
Original file line number Diff line number Diff line change
@@ -107,12 +107,6 @@ for j in "$JRUBY_HOME"/lib/jruby.jar "$JRUBY_HOME"/lib/jruby-complete.jar; do
JRUBY_ALREADY_ADDED=true
done

# The Truffle jar always needs to be on the boot classpath, if it exists, so
# that the VM can substitute classes.
if [ -e "$JRUBY_HOME/lib/jruby-truffle.jar" ]; then
JRUBY_CP="$JRUBY_CP$CP_DELIMITER$JRUBY_HOME/lib/jruby-truffle.jar"
fi

# ----- Set Up The System Classpath -------------------------------------------

if [ "$JRUBY_PARENT_CLASSPATH" != "" ]; then
@@ -124,6 +118,9 @@ else
if [ "$j" == "$JRUBY_HOME"/lib/jruby.jar ]; then
continue
fi
if [ "$j" == "$JRUBY_HOME"/lib/jruby-truffle.jar ]; then
continue
fi
if [ "$j" == "$JRUBY_HOME"/lib/jruby-complete.jar ]; then
continue
fi
@@ -200,6 +197,10 @@ do
-X*\.\.\.|-X*\?)
ruby_args="${ruby_args} $1" ;;
# Match -Xa.b.c=d to translate to -Da.b.c=d as a java option
-X+T)
JRUBY_CP="$JRUBY_CP$CP_DELIMITER$JRUBY_HOME/lib/jruby-truffle.jar"
ruby_args="${ruby_args} -X+T"
;;
-X*)
val=${1:2}
if expr "$val" : '.*[.]' > /dev/null; then

0 comments on commit e84c5e6

Please sign in to comment.