[DOC] IO#close on closed IO is not an error.

This commit is contained in:
Tanaka Akira 2024-06-18 22:51:24 +09:00
parent dfb67a4433
commit ed2f8ea62e

3
io.c
View File

@ -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|