Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 22159f94365f
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3cabc55bb8e4
Choose a head ref
  • 2 commits
  • 4 files changed
  • 1 contributor

Commits on May 14, 2016

  1. Copy the full SHA
    c02fa9b View commit details
  2. Copy the full SHA
    3cabc55 View commit details
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ public Object execute(org.jruby.ast.RootNode rootNode) {
"See https://github.com/jruby/jruby/wiki/Truffle-FAQ#how-do-i-get-jrubytruffle");
}

context.setInitialJRubyRootNode(rootNode);
context.getJRubyInterop().setOriginalInputFile(rootNode.getPosition().getFile());

try {
return engine.eval(Source.fromText("Truffle::Boot.run_jruby_root", "run_jruby_root")
9 changes: 0 additions & 9 deletions truffle/src/main/java/org/jruby/truffle/RubyContext.java
Original file line number Diff line number Diff line change
@@ -94,7 +94,6 @@ public class RubyContext extends ExecutionContext {

private final Object classVariableDefinitionLock = new Object();

private org.jruby.ast.RootNode initialJRubyRootNode;
private final AttachmentsManager attachmentsManager;

public RubyContext(Ruby jrubyRuntime, TruffleLanguage.Env env) {
@@ -223,14 +222,6 @@ public void shutdown() {
}
}

public void setInitialJRubyRootNode(org.jruby.ast.RootNode initialJRubyRootNode) {
this.initialJRubyRootNode = initialJRubyRootNode;
}

public org.jruby.ast.RootNode getInitialJRubyRootNode() {
return initialJRubyRootNode;
}

public Options getOptions() {
return options;
}
Original file line number Diff line number Diff line change
@@ -23,6 +23,8 @@ public class JRubyInterop {

private RubyContext context;

private String originalInputFile;

public JRubyInterop(RubyContext context) {
this.context = context;
}
@@ -83,4 +85,11 @@ public void setVerboseNil() {
context.getJRubyRuntime().setVerbose(context.getJRubyRuntime().getNil());
}

public void setOriginalInputFile(String originalInputFile) {
this.originalInputFile = originalInputFile;
}

public String getOriginalInputFile() {
return originalInputFile;
}
}
Original file line number Diff line number Diff line change
@@ -106,7 +106,7 @@ public Object runJRubyRootNode(VirtualFrame frame, @Cached("create()")IndirectCa
StringOperations.createString(getContext(),
ByteList.create(getContext().getJRubyInterop().getArg0())));

String inputFile = getContext().getInitialJRubyRootNode().getPosition().getFile();
String inputFile = getContext().getJRubyInterop().getOriginalInputFile();

final Source source;