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

ruby-changes:45076

From: rhe <ko1@a...>
Date: Thu, 22 Dec 2016 13:40:34 +0900 (JST)
Subject: [ruby-changes:45076] rhe:r57149 (trunk): io.c: [DOC] update outdated documentation of ARGF.close

rhe	2016-12-22 13:40:28 +0900 (Thu, 22 Dec 2016)

  New Revision: 57149

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

  Log:
    io.c: [DOC] update outdated documentation of ARGF.close
    
    As of Ruby 2.3, IO#close no longer raises IOError if the file is already
    closed.

  Modified files:
    trunk/io.c
Index: io.c
===================================================================
--- io.c	(revision 57148)
+++ io.c	(revision 57149)
@@ -11879,9 +11879,9 @@ argf_skip(VALUE argf) https://github.com/ruby/ruby/blob/trunk/io.c#L11879
  *  call-seq:
  *     ARGF.close  -> ARGF
  *
- *  Closes the current file and skips to the next in the stream. Trying to
- *  close a file that has already been closed causes an +IOError+ to be
- *  raised.
+ *  Closes the current file and skips to the next file in ARGV. If there are
+ *  no more files to open, just closes the current file. +STDIN+ will not be
+ *  closed.
  *
  * For example:
  *
@@ -11891,7 +11891,6 @@ argf_skip(VALUE argf) https://github.com/ruby/ruby/blob/trunk/io.c#L11891
  *     ARGF.close
  *     ARGF.filename  #=> "bar"
  *     ARGF.close
- *     ARGF.close     #=> closed stream (IOError)
  */
 static VALUE
 argf_close_m(VALUE argf)

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

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