Skip to content

Commit

Permalink
handle -J-cp without errors on launch in same VM
Browse files Browse the repository at this point in the history
  • Loading branch information
mkristian committed Jun 8, 2015
1 parent 5b46184 commit e03303a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/src/main/java/org/jruby/util/cli/ArgumentProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,12 @@ private void processArgument() {
config.getLoadPaths().addAll(Arrays.asList(ls));
break FOR;
case 'J':
grabOptionalValue();
String js = grabOptionalValue();
config.getError().println("warning: " + argument + " argument ignored (launched in same VM?)");
if (js.equals("-cp") || js.equals("-classpath")) {
for(;grabOptionalValue() != null;) {}
grabValue(getArgumentError(" -J-cp must be followed by a path expression"));
}
break FOR;
case 'K':
// FIXME: No argument seems to work for -K in MRI plus this should not
Expand Down

0 comments on commit e03303a

Please sign in to comment.