Skip to content

Commit

Permalink
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -615,7 +615,7 @@ private String resolve(String path, String scriptName) {
return null;
}

private String resolveScript(String scriptName) {
public String resolveScript(String scriptName) {
// These try/catches are to allow failing over to the "commands" logic
// when running from within a jruby-complete jar file, which has
// jruby.home = a jar file URL that does not resolve correctly with
Original file line number Diff line number Diff line change
@@ -93,8 +93,12 @@ private void initEnvironment() {
}

public void processArguments(String[] arguments) {
new ArgumentProcessor(arguments, this).processArguments();
final ArgumentProcessor processor = new ArgumentProcessor(arguments, this);
processor.processArguments();
tryProcessArgumentsWithRubyopts();
if (getInlineScript() == null && getScriptFileName() == null && System.console() != null) {
setScriptFileName(processor.resolveScript("irb"));
}
}

public void tryProcessArgumentsWithRubyopts() {

0 comments on commit c6addb0

Please sign in to comment.