Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Truffle] Run irb instead of reading from stdin by default.
Browse files Browse the repository at this point in the history
chrisseaton committed Dec 10, 2016

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 2a7c4dd commit 0f5ac1e
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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() {

0 comments on commit 0f5ac1e

Please sign in to comment.