Skip to content

Commit 421290d

Browse files
committed
JRUBY-4265: Using -J (to set a Java option) clobbers the CLASSPATH
Identical patches by David Calavera and me. ;) Note: This is a regression, caused by fix for JRUBY-3800.
1 parent a4431b6 commit 421290d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

bin/jruby

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,11 @@ do
171171
exit
172172
elif [ "${val}" = "-classpath" ]; then
173173
CP="$CP$CP_DELIMITER$2"
174+
CLASSPATH=""
174175
shift
175176
elif [ "${val}" = "-cp" ]; then
176177
CP="$CP$CP_DELIMITER$2"
178+
CLASSPATH=""
177179
shift
178180
else
179181
if [ "${val:0:3}" = "-ea" ]; then
@@ -183,9 +185,6 @@ do
183185
fi
184186
java_args=("${java_args[@]}" "${1:2}")
185187
fi
186-
if [ "$CP" != "" ]; then
187-
CLASSPATH=""
188-
fi
189188
;;
190189
# Match switches that take an argument
191190
-C|-e|-I|-S) ruby_args=("${ruby_args[@]}" "$1" "$2"); shift ;;

0 commit comments

Comments
 (0)