Skip to content

Commit

Permalink
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ public class JRubyTruffleImpl implements JRubyTruffleInterface {

// Run by reflection from Ruby#loadTruffle
public JRubyTruffleImpl(Ruby runtime) {
engine = PolyglotEngine.buildNew().globalSymbol(JRubyTruffleInterface.RUNTIME_SYMBOL, new RubyLanguage.JRubyContextWrapper(runtime)).build();
engine = PolyglotEngine.newBuilder().globalSymbol(JRubyTruffleInterface.RUNTIME_SYMBOL, new RubyLanguage.JRubyContextWrapper(runtime)).build();

try {
context = (RubyContext) engine.eval(Source.fromText("Truffle::Primitive.context", "context").withMimeType(RubyLanguage.MIME_TYPE)).get();
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@
public class PolyglotEngineMain {

public static void main(String[] args) {
final PolyglotEngine engine = PolyglotEngine.buildNew().build();
final PolyglotEngine engine = PolyglotEngine.newBuilder().build();

for (String arg : args) {
try (InputStream inputStream = new FileInputStream(arg)) {
4 changes: 2 additions & 2 deletions truffle/src/test/java/org/jruby/truffle/tck/RubyTckTest.java
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ public class RubyTckTest extends TruffleTCK {

@Test
public void checkVM() {
PolyglotEngine engine = PolyglotEngine.buildNew().build();
PolyglotEngine engine = PolyglotEngine.newBuilder().build();
assertNotNull(engine.getLanguages().get(mimeType()));
}

@@ -67,7 +67,7 @@ protected PolyglotEngine prepareVM() throws Exception {
+ "Truffle::Interop.export(\"compound_object\", method(:compound_object))\n"
+ "Truffle::Interop.export(\"identity\", method(:identity))\n",
"test").withMimeType(mimeType());
PolyglotEngine engine = PolyglotEngine.buildNew().build();
PolyglotEngine engine = PolyglotEngine.newBuilder().build();
engine.eval(source);
return engine;
}

0 comments on commit 5995af9

Please sign in to comment.