Skip to content
Permalink
Browse files
[Truffle] File.delete and File.unlink are aliases.
  • Loading branch information
nirvdrum committed Jan 3, 2015
1 parent dbdd06a commit d928b383adf4aeadab7f81d5ce7678236cdecf8e
Showing 3 changed files with 1 addition and 3 deletions.
@@ -66,7 +66,7 @@ public RubyNilClass close(RubyFile file) {

}

@CoreMethod(names = "delete", onSingleton = true, required = 1)
@CoreMethod(names = { "delete", "unlink" }, onSingleton = true, required = 1)
public abstract static class DeleteNode extends CoreMethodNode {

public DeleteNode(RubyContext context, SourceSection sourceSection) {
@@ -1,5 +1,4 @@
fails:File.delete returns 0 when called without arguments
fails:File.delete deletes a single file
fails:File.delete deletes multiple files
fails:File.delete raises a TypeError if not passed a String type
fails:File.delete raises an Errno::ENOENT when the given file doesn't exist
@@ -1,5 +1,4 @@
fails:File.unlink returns 0 when called without arguments
fails:File.unlink deletes a single file
fails:File.unlink deletes multiple files
fails:File.unlink raises a TypeError if not passed a String type
fails:File.unlink raises an Errno::ENOENT when the given file doesn't exist

0 comments on commit d928b38

Please sign in to comment.