Skip to content

Commit

Permalink
Use a Java POSIX since getScriptSource needs isSymLink.
Browse files Browse the repository at this point in the history
Fixes #3901.
headius committed May 18, 2016
1 parent 24e246d commit 9f0e3d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/main/java/org/jruby/util/JRubyFile.java
Original file line number Diff line number Diff line change
@@ -38,6 +38,7 @@
import jnr.posix.JavaSecuredFile;
import jnr.posix.POSIX;

import jnr.posix.POSIXFactory;
import org.jruby.Ruby;
import org.jruby.platform.Platform;
import org.jruby.runtime.ThreadContext;
@@ -59,7 +60,7 @@ public static FileResource createResource(ThreadContext context, String pathname
}

public static FileResource createRestrictedResource(String cwd, String pathname) {
return createResource(null, null, cwd, pathname);
return createResource(POSIXFactory.getJavaPOSIX(), null, cwd, pathname);
}

public static FileResource createResource(Ruby runtime, String pathname) {

0 comments on commit 9f0e3d9

Please sign in to comment.