[前][次][番号順一覧][スレッド一覧]

ruby-changes:48160

From: hsbt <ko1@a...>
Date: Sat, 21 Oct 2017 22:49:45 +0900 (JST)
Subject: [ruby-changes:48160] hsbt:r60274 (trunk): Improve docs for `File.delete` exceptions.

hsbt	2017-10-21 22:49:39 +0900 (Sat, 21 Oct 2017)

  New Revision: 60274

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60274

  Log:
    Improve docs for `File.delete` exceptions.
    
      https://github.com/ruby/ruby/pull/1505
    
      Patch by @mrtazz [fix GH-1505]

  Modified files:
    trunk/file.c
Index: file.c
===================================================================
--- file.c	(revision 60273)
+++ file.c	(revision 60274)
@@ -2883,6 +2883,12 @@ unlink_internal(const char *path, VALUE https://github.com/ruby/ruby/blob/trunk/file.c#L2883
  *
  *  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
+ *  <code>unlink(2)</code> 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. <code>Errno::ENOENT</code>.
+ *
  *  See also <code>Dir::rmdir</code>.
  */
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]