Skip to content

Commit

Permalink
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion spec/truffle/tags/core/file/link_tags.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
fails:File.link link a file with another
fails:File.link raises an Errno::EEXIST if the target already exists
1 change: 0 additions & 1 deletion spec/truffle/tags/core/file/symlink_tags.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
fails:File.symlink creates a symlink between a source and target file
fails:File.symlink raises an Errno::EEXIST if the target already exists
Original file line number Diff line number Diff line change
@@ -54,6 +54,12 @@ public RubyException eexist(RubyString message, int errno) {
return getContext().getCoreLibrary().fileExistsError(message.toString(), this);
}

@Specialization(guards = "errno == EEXIST")
public RubyException eexist(RubyNilClass message, int errno) {
return getContext().getCoreLibrary().fileExistsError("nil", this);
}


@CompilerDirectives.TruffleBoundary
@Specialization(guards = "!isExceptionSupported(errno)")
public RubyException unsupported(RubyString message, int errno) {

0 comments on commit 3923c67

Please sign in to comment.