Skip to content

Commit

Permalink
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions truffle/src/main/java/org/jruby/truffle/JRubyTruffleImpl.java
Original file line number Diff line number Diff line change
@@ -27,10 +27,13 @@ public class JRubyTruffleImpl implements JRubyTruffleInterface {
// Created by reflection from Ruby#loadTruffle

public JRubyTruffleImpl(Ruby runtime) {
engine = PolyglotEngine.newBuilder().globalSymbol(JRubyTruffleInterface.RUNTIME_SYMBOL, new JRubyContextWrapper(runtime)).build();
engine = PolyglotEngine.newBuilder()
.globalSymbol(JRubyTruffleInterface.RUNTIME_SYMBOL, new JRubyContextWrapper(runtime))
.build();

try {
context = (RubyContext) engine.eval(Source.fromText("Truffle::Primitive.context", "context").withMimeType(RubyLanguage.MIME_TYPE)).get();
context = (RubyContext) engine.eval(Source.fromText("Truffle::Primitive.context", "context")
.withMimeType(RubyLanguage.MIME_TYPE)).get();
} catch (IOException e) {
throw new RuntimeException(e);
}

0 comments on commit 657f885

Please sign in to comment.