Skip to content

Commit fc69e71

Browse files
committed
Fix JRUBY-4768: 'jruby -X' should be more friendly
1 parent 432ac84 commit fc69e71

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

argparser.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ using namespace std;
2424
const char *ArgParser::HELP_MSG =
2525
"JRuby Launcher usage: jruby" EXEEXT " {options} arguments\n\n\
2626
Options:\n\
27-
-Xhelp show this help\n\
2827
-Xversion print launcher's version\n\
2928
\nJvm Management:\n\
3029
-Xjdkhome <path> set path to JDK\n\
@@ -37,7 +36,7 @@ Options:\n\
3736
-Xnobootclasspath don't put jruby jars on the bootclasspath\n\
3837
\nMisc:\n\
3938
-Xtrace <path> path for launcher log (for troubleshooting)\n\
40-
-Xcommand just print the equivalent java command and exit\n\
39+
-Xcommand just print the equivalent java command and exit\n\n\
4140
-Xprop.erty[=value] equivalent to -J-Djruby.<prop.erty>[=value]\n\
4241
-Xproperties list supported properties (omit \"jruby.\" with -X)\n"
4342
#ifdef WIN32
@@ -309,7 +308,7 @@ bool ArgParser::parseArgs(int argc, char *argv[]) {
309308
noBootClassPath = true;
310309
}
311310
javaOptions.push_back(javaOpt);
312-
} else if (strcmp(it->c_str(), "-Xhelp") == 0) {
311+
} else if (strcmp(it->c_str(), "-Xhelp") == 0 || strcmp(it->c_str(), "-X") == 0) {
313312
printToConsole(HELP_MSG);
314313
if (!appendHelp.empty()) {
315314
printToConsole(appendHelp.c_str());

0 commit comments

Comments
 (0)