From 926103a958c9719074f190fb7ac622a160008313 Mon Sep 17 00:00:00 2001 From: hsbt Date: Sat, 21 Oct 2017 13:49:39 +0000 Subject: [PATCH] Improve docs for `File.delete` exceptions. https://github.com/ruby/ruby/pull/1505 Patch by @mrtazz [fix GH-1505] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- file.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/file.c b/file.c index b0e4888f7e..ee2e87cfbc 100644 --- a/file.c +++ b/file.c @@ -2883,6 +2883,12 @@ unlink_internal(const char *path, VALUE pathv, void *arg) * * Deletes the named files, returning the number of names * passed as arguments. Raises an exception on any error. + * Since the underlying implementation relies on the + * unlink(2) system call, the type of + * exception raised depends on its error type (see + * https://linux.die.net/man/2/unlink) and has the form of + * e.g. Errno::ENOENT. + * * See also Dir::rmdir. */