summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorTanaka Akira <[email protected]>2024-06-18 22:51:24 +0900
committerTanaka Akira <[email protected]>2024-06-19 13:42:40 +0900
commited2f8ea62ebe77bbb8408cb27b416c4a7f1023cc (patch)
tree4d712b354a88a8e40fe574219bfb644f0d9759c7 /io.c
parentdfb67a44338e5c17d53be3f65e1fb5ccb33367d0 (diff)
[DOC] IO#close on closed IO is not an error.
Diffstat (limited to 'io.c')
-rw-r--r--io.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/io.c b/io.c
index 8acb1f562e..54b60b7357 100644
--- a/io.c
+++ b/io.c
@@ -5699,6 +5699,9 @@ rb_io_close(VALUE io)
* If the stream was opened by IO.popen, sets global variable <tt>$?</tt>
* (child exit status).
*
+ * It is not an error to close an IO object that has already been closed.
+ * It just returns nil.
+ *
* Example:
*
* IO.popen('ruby', 'r+') do |pipe|