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: 02b2d6c9b33b
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1cc597dc4d90
Choose a head ref
  • 3 commits
  • 5 files changed
  • 1 contributor

Commits on Dec 7, 2016

  1. Copy the full SHA
    2bf302c View commit details
  2. Copy the full SHA
    0a7c617 View commit details

Commits on Dec 8, 2016

  1. 1
    Copy the full SHA
    1cc597d View commit details
1 change: 0 additions & 1 deletion spec/truffle/tags/core/dir/pwd_tags.txt

This file was deleted.

1 change: 1 addition & 0 deletions spec/truffle/tags/core/file/constants/constants_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:File::TMPFILE is defined
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/file/sticky_tags.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
fails:File.sticky? returns true if the named file has the sticky bit, otherwise false
fails:File.sticky? cannot set sticky bit to a normal file
slow:File.sticky? returns true if the file has sticky bit set
Original file line number Diff line number Diff line change
@@ -81,7 +81,7 @@ public static abstract class DirOpenPrimitiveNode extends PrimitiveArrayArgument
public DynamicObject open(DynamicObject dir, DynamicObject path, DynamicObject encoding) {
// TODO CS 22-Apr-15 race conditions here

final File file = new File(path.toString());
final File file = new File(StringOperations.decodeUTF8(path));

if (!file.isDirectory()) {
throw new RaiseException(coreExceptions().errnoError(Errno.ENOTDIR.intValue(), this));
Original file line number Diff line number Diff line change
@@ -363,7 +363,7 @@ public abstract static class MkdirNode extends CoreMethodArrayArgumentsNode {
@CompilerDirectives.TruffleBoundary
@Specialization(guards = "isRubyString(path)")
public int mkdir(DynamicObject path, int mode) {
return posix().mkdir(path.toString(), mode);
return posix().mkdir(StringOperations.decodeUTF8(path), mode);
}

}
@@ -374,7 +374,7 @@ public abstract static class ChdirNode extends CoreMethodArrayArgumentsNode {
@CompilerDirectives.TruffleBoundary
@Specialization(guards = "isRubyString(path)")
public int chdir(DynamicObject path) {
final String pathString = path.toString();
final String pathString = StringOperations.decodeUTF8(path);

final int result = posix().chdir(pathString);

@@ -564,7 +564,7 @@ public abstract static class RmdirNode extends CoreMethodArrayArgumentsNode {
@CompilerDirectives.TruffleBoundary
@Specialization(guards = "isRubyString(path)")
public int rmdir(DynamicObject path) {
return posix().rmdir(path.toString());
return posix().rmdir(StringOperations.decodeUTF8(path));
}

}
@@ -687,7 +687,7 @@ public abstract static class SymlinkNode extends CoreMethodArrayArgumentsNode {
@CompilerDirectives.TruffleBoundary
@Specialization(guards = {"isRubyString(first)", "isRubyString(second)"})
public int symlink(DynamicObject first, DynamicObject second) {
return posix().symlink(first.toString(), second.toString());
return posix().symlink(StringOperations.decodeUTF8(first), StringOperations.decodeUTF8(second));
}

}
@@ -705,8 +705,8 @@ public int getaddrinfoNil(DynamicObject hostName, DynamicObject serviceName, Dyn
@Specialization(guards = {"isRubyString(hostName)", "isRubyString(serviceName)", "isRubyPointer(hintsPointer)", "isRubyPointer(resultsPointer)"})
public int getaddrinfoString(DynamicObject hostName, DynamicObject serviceName, DynamicObject hintsPointer, DynamicObject resultsPointer) {
return nativeSockets().getaddrinfo(
StringOperations.rope(hostName).toString(),
StringOperations.rope(serviceName).toString(),
StringOperations.decodeUTF8(hostName),
StringOperations.decodeUTF8(serviceName),
Layouts.POINTER.getPointer(hintsPointer),
Layouts.POINTER.getPointer(resultsPointer));
}
@@ -715,7 +715,7 @@ public int getaddrinfoString(DynamicObject hostName, DynamicObject serviceName,
@Specialization(guards = {"isRubyString(hostName)", "isNil(serviceName)", "isRubyPointer(hintsPointer)", "isRubyPointer(resultsPointer)"})
public int getaddrinfo(DynamicObject hostName, DynamicObject serviceName, DynamicObject hintsPointer, DynamicObject resultsPointer) {
return nativeSockets().getaddrinfo(
StringOperations.rope(hostName).toString(),
StringOperations.decodeUTF8(hostName),
null,
Layouts.POINTER.getPointer(hintsPointer),
Layouts.POINTER.getPointer(resultsPointer));