diff options
| author | Randy Stauner <randy@r4s6.net> | 2025-09-22 10:03:00 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-22 10:03:00 -0700 |
| commit | 1d1529629ce1550fad19c2d9410c4bf4995230d2 (patch) | |
| tree | 606f902bf658979542af7112e22fd107c42a11a8 | |
| parent | 4afc6370cba7e83c204edcdf1c2f8d1497af2f7c (diff) | |
Clarify what happens when IO.popen's block returns (#14626)
| -rw-r--r-- | io.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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]. |
