Skip to content

Commit

Permalink
[Truffle] Run irb instead of reading from stdin by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisseaton committed Dec 10, 2016
1 parent 2a7c4dd commit 0f5ac1e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Expand Up @@ -616,7 +616,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
Expand Down
Expand Up @@ -96,8 +96,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 (getScriptFileName() == null && System.console() != null) {
setScriptFileName(processor.resolveScript("irb"));
}
}

public void tryProcessArgumentsWithRubyopts() {
Expand Down

0 comments on commit 0f5ac1e

Please sign in to comment.