@@ -23,8 +23,8 @@ using namespace std;
23
23
24
24
const char *ArgParser::HELP_MSG =
25
25
" JRuby Launcher usage: jruby" EXEEXT " {options} arguments\n\n \
26
+ To see general JRuby options, type 'jruby -h' or 'jruby --help'.\n\n \
26
27
Options:\n \
27
- -Xhelp show this help\n \
28
28
-Xversion print launcher's version\n \
29
29
\n Jvm Management:\n \
30
30
-Xjdkhome <path> set path to JDK\n \
@@ -37,13 +37,13 @@ Options:\n\
37
37
-Xnobootclasspath don't put jruby jars on the bootclasspath\n \
38
38
\n Misc:\n \
39
39
-Xtrace <path> path for launcher log (for troubleshooting)\n \
40
- -Xcommand just print the equivalent java command and exit\n \
40
+ -Xcommand just print the equivalent java command and exit\n\n \
41
41
-Xprop.erty[=value] equivalent to -J-Djruby.<prop.erty>[=value]\n \
42
42
-Xproperties list supported properties (omit \" jruby.\" with -X)\n "
43
43
#ifdef WIN32
44
44
" -Xconsole <mode> jrubyw console attach mode (new|attach|suppress)\n\n "
45
45
#endif
46
- " To see general JRuby options, type 'jruby -h' or 'jruby --help'. \n " ;
46
+ ;
47
47
48
48
const char *ArgParser::REQ_JAVA_VERSION = " 1.5" ;
49
49
@@ -309,11 +309,15 @@ bool ArgParser::parseArgs(int argc, char *argv[]) {
309
309
noBootClassPath = true ;
310
310
}
311
311
javaOptions.push_back (javaOpt);
312
- } else if (strcmp (it->c_str (), " -Xhelp" ) == 0 ) {
312
+ } else if (strcmp (it->c_str (), " -Xhelp" ) == 0 || strcmp (it-> c_str (), " -X " ) == 0 ) {
313
313
printToConsole (HELP_MSG);
314
314
if (!appendHelp.empty ()) {
315
315
printToConsole (appendHelp.c_str ());
316
316
}
317
+ progArgs.push_back (" -Xnopreamble" );
318
+ return false ;
319
+ } else if (strcmp (it->c_str (), " -Xversion" ) == 0 ) {
320
+ printToConsole (" JRuby Launcher Version " JRUBY_LAUNCHER_VERSION " \n " );
317
321
return false ;
318
322
} else if (strcmp (it->c_str (), " -Xversion" ) == 0 ) {
319
323
printToConsole (" JRuby Launcher Version " JRUBY_LAUNCHER_VERSION " \n " );
@@ -419,8 +423,8 @@ void ArgParser::prepareOptions() {
419
423
}
420
424
421
425
void ArgParser::setupMaxHeapAndStack () {
422
- // Hard-coded 500m, 1024k is for consistency with jruby shell script.
423
- string heapSize (" 500m" ), stackSize (" 1024k " );
426
+ // Hard-coded 500m, 2048k is for consistency with jruby shell script.
427
+ string heapSize (" 500m" ), stackSize (" 2048k " );
424
428
bool maxHeap = false , maxStack = false ;
425
429
for (list<string>::iterator it = javaOptions.begin (); it != javaOptions.end (); it++) {
426
430
if (!maxHeap && strncmp (" -Xmx" , it->c_str (), 4 ) == 0 ) {
0 commit comments