@@ -29,9 +29,9 @@ public void testNoPermissions() throws Throwable {
29
29
30
30
@ Test
31
31
public void testNativeNoThreads () throws Throwable {
32
- // TODO (eregon, 4 Feb 2019): This should run on GraalVM, not developement jars
32
+ // TODO (eregon, 4 Feb 2019): This should run on GraalVM, not development jars
33
33
String home = System .getProperty ("user.dir" ) + "/mxbuild/graalvm/jre/languages/ruby" ;
34
- try (Context context = Context .newBuilder ("ruby" ).allowNativeAccess (true ).option ("ruby.home" , home ).build ()) {
34
+ try (Context context = Context .newBuilder ("ruby" ).allowNativeAccess (true ).allowExperimentalOptions ( true ). option ("ruby.home" , home ).build ()) {
35
35
Assert .assertEquals (3 , context .eval ("ruby" , "1 + 2" ).asInt ());
36
36
37
37
Assert .assertEquals (true , context .eval ("ruby" , "File.directory?('.')" ).asBoolean ());
@@ -41,7 +41,7 @@ public void testNativeNoThreads() throws Throwable {
41
41
@ Test
42
42
public void testThreadsNoNative () throws Throwable {
43
43
// The ruby.single_threaded option needs to be set because --single_threaded defaults to --embedded.
44
- try (Context context = Context .newBuilder ("ruby" ).allowCreateThread (true ).option ("ruby.single_threaded" , "false" ).build ()) {
44
+ try (Context context = Context .newBuilder ("ruby" ).allowCreateThread (true ).allowExperimentalOptions ( true ). option ("ruby.single_threaded" , "false" ).build ()) {
45
45
Assert .assertEquals (3 , context .eval ("ruby" , "1 + 2" ).asInt ());
46
46
47
47
Assert .assertEquals (7 , context .eval ("ruby" , "Thread.new { 3 + 4 }.value" ).asInt ());
@@ -53,7 +53,7 @@ public void testThreadsNoNative() throws Throwable {
53
53
54
54
@ Test
55
55
public void testNoThreadsEnforcesSingleThreadedOption () throws Throwable {
56
- try (Context context = Context .newBuilder ("ruby" ).option ("ruby.single_threaded" , "false" ).build ()) {
56
+ try (Context context = Context .newBuilder ("ruby" ).allowExperimentalOptions ( true ). option ("ruby.single_threaded" , "false" ).build ()) {
57
57
String option = "Truffle::Boot.get_option('single_threaded')" ;
58
58
Assert .assertEquals (true , context .eval ("ruby" , option ).asBoolean ());
59
59
0 commit comments