summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandy Stauner <randy@r4s6.net>2025-09-22 10:03:00 -0700
committerGitHub <noreply@github.com>2025-09-22 10:03:00 -0700
commit1d1529629ce1550fad19c2d9410c4bf4995230d2 (patch)
tree606f902bf658979542af7112e22fd107c42a11a8
parent4afc6370cba7e83c204edcdf1c2f8d1497af2f7c (diff)
Clarify what happens when IO.popen's block returns (#14626)
-rw-r--r--io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/io.c b/io.c
index f6daa79399..caa364a70b 100644
--- a/io.c
+++ b/io.c
@@ -7835,7 +7835,8 @@ static VALUE popen_finish(VALUE port, VALUE klass);
* If a block is given, the stream is passed to the block
* (again, open for reading, writing, or both);
* when the block exits, the stream is closed,
- * and the block's value is assigned to global variable <tt>$?</tt> and returned.
+ * the block's value is returned,
+ * and the global variable <tt>$?</tt> is set to the child's exit status.
*
* Optional argument +mode+ may be any valid \IO mode.
* See {Access Modes}[rdoc-ref:File@Access+Modes].