summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorrhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-22 04:40:28 +0000
committerrhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-22 04:40:28 +0000
commitac8f9a0af7b108f03b58b8077492e845a30f08c1 (patch)
tree30cd08684856ec04e653c3cc74d7a00a0777c977 /io.c
parenta1f3d0b6932875b47537d4c11d3fa826eb113d5c (diff)
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/io.c b/io.c
index 65254ff102..af2d54bd3b 100644
--- a/io.c
+++ b/io.c
@@ -11879,9 +11879,9 @@ argf_skip(VALUE argf)
* 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)
* ARGF.close
* ARGF.filename #=> "bar"
* ARGF.close
- * ARGF.close #=> closed stream (IOError)
*/
static VALUE
argf_close_m(VALUE argf)