File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2009-2010 JRuby Team (www.jruby.org).
2
+ * Copyright 2009-2011 JRuby Team (www.jruby.org).
3
3
*/
4
4
5
5
#include < cstring>
@@ -41,8 +41,9 @@ Options:\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
- " -Xconsole <mode> jrubyw console attach mode (new|attach|suppress)\n\n "
44
+ " -Xconsole <mode> jrubyw console attach mode (new|attach|suppress)\n "
45
45
#endif
46
+ " \n "
46
47
;
47
48
48
49
const char *ArgParser::REQ_JAVA_VERSION = " 1.5" ;
@@ -314,8 +315,8 @@ bool ArgParser::parseArgs(int argc, char *argv[]) {
314
315
if (!appendHelp.empty ()) {
315
316
printToConsole (appendHelp.c_str ());
316
317
}
317
- progArgs .push_back (" -Xnopreamble " );
318
- return false ;
318
+ javaOptions .push_back (" -Djruby.launcher.nopreamble=true " );
319
+ progArgs. push_back ( " -X " ) ;
319
320
} else if (strcmp (it->c_str (), " -Xversion" ) == 0 ) {
320
321
printToConsole (" JRuby Launcher Version " JRUBY_LAUNCHER_VERSION " \n " );
321
322
return false ;
Original file line number Diff line number Diff line change 10
10
end
11
11
12
12
it "should print help message" do
13
- jruby_launcher ( "-Xhelp 2>&1" ) . should =~ /JRuby Launcher usage/
14
- jruby_launcher ( "-X 2>&1" ) . should =~ /JRuby Launcher usage/
13
+ args = jruby_launcher_args ( "-Xhelp 2>&1" )
14
+ args . detect { |l | l =~ /JRuby Launcher usage/ } . should be_true
15
+ args [ -1 ] . should == "-X"
16
+ args = jruby_launcher_args ( "-X 2>&1" )
17
+ args . detect { |l | l =~ /JRuby Launcher usage/ } . should be_true
18
+ args [ -1 ] . should == "-X"
15
19
end
16
20
17
21
it "should use $JAVACMD when JAVACMD is specified" do
You can’t perform that action at this time.
0 commit comments