Skip to content

Commit 8af7278

Browse files
committed
Merge branch 'master' of [email protected]:jruby/jruby-launcher
2 parents f512094 + 3f91906 commit 8af7278

File tree

5 files changed

+17
-12
lines changed

5 files changed

+17
-12
lines changed

argparser.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ using namespace std;
2323

2424
const char *ArgParser::HELP_MSG =
2525
"JRuby Launcher usage: jruby" EXEEXT " {options} arguments\n\n\
26+
To see general JRuby options, type 'jruby -h' or 'jruby --help'.\n\n\
2627
Options:\n\
27-
-Xhelp show this help\n\
2828
-Xversion print launcher's version\n\
2929
\nJvm Management:\n\
3030
-Xjdkhome <path> set path to JDK\n\
@@ -37,13 +37,13 @@ Options:\n\
3737
-Xnobootclasspath don't put jruby jars on the bootclasspath\n\
3838
\nMisc:\n\
3939
-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\
4141
-Xprop.erty[=value] equivalent to -J-Djruby.<prop.erty>[=value]\n\
4242
-Xproperties list supported properties (omit \"jruby.\" with -X)\n"
4343
#ifdef WIN32
4444
" -Xconsole <mode> jrubyw console attach mode (new|attach|suppress)\n\n"
4545
#endif
46-
"To see general JRuby options, type 'jruby -h' or 'jruby --help'.\n";
46+
;
4747

4848
const char *ArgParser::REQ_JAVA_VERSION = "1.5";
4949

@@ -309,11 +309,15 @@ bool ArgParser::parseArgs(int argc, char *argv[]) {
309309
noBootClassPath = true;
310310
}
311311
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) {
313313
printToConsole(HELP_MSG);
314314
if (!appendHelp.empty()) {
315315
printToConsole(appendHelp.c_str());
316316
}
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");
317321
return false;
318322
} else if (strcmp(it->c_str(), "-Xversion") == 0) {
319323
printToConsole("JRuby Launcher Version " JRUBY_LAUNCHER_VERSION "\n");
@@ -419,8 +423,8 @@ void ArgParser::prepareOptions() {
419423
}
420424

421425
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");
424428
bool maxHeap = false, maxStack = false;
425429
for (list<string>::iterator it = javaOptions.begin(); it != javaOptions.end(); it++) {
426430
if (!maxHeap && strncmp("-Xmx", it->c_str(), 4) == 0) {

lib/jruby-launcher.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module JRubyLauncher
2-
VERSION = "1.0.5"
2+
VERSION = "1.0.6"
33
end

lib/rubygems/defaults/jruby_native.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
class Gem::ConfigFile
2-
PLATFORM_DEFAULTS.delete('install')
3-
PLATFORM_DEFAULTS.delete('update')
2+
PLATFORM_DEFAULTS['install'] = '--no-rdoc --no-ri'
3+
PLATFORM_DEFAULTS['update'] = '--no-rdoc --no-ri'
44
end

spec/launcher_spec.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
it "should print help message" do
1313
jruby_launcher("-Xhelp 2>&1").should =~ /JRuby Launcher usage/
14+
jruby_launcher("-X 2>&1").should =~ /JRuby Launcher usage/
1415
end
1516

1617
it "should use $JAVACMD when JAVACMD is specified" do
@@ -86,8 +87,8 @@
8687
jruby_launcher_args("-J-Xmx256m").should include("-Xmx256m", "-Djruby.memory.max=256m")
8788
end
8889

89-
it "should default to 1024k max stack" do
90-
jruby_launcher_args("").should include("-Xss1024k", "-Djruby.stack.max=1024k")
90+
it "should default to 2048k max stack" do
91+
jruby_launcher_args("").should include("-Xss2048k", "-Djruby.stack.max=2048k")
9192
end
9293

9394
it "should allow max stack to be overridden" do

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
#ifndef _VERSION_H_
77
#define _VERSION_H_
88

9-
#define JRUBY_LAUNCHER_VERSION "1.0.5"
9+
#define JRUBY_LAUNCHER_VERSION "1.0.6"
1010

1111
#endif // ! _VERSION_H_

0 commit comments

Comments
 (0)