summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/io.c b/io.c
index 4b6851b44d..f5122cf1c3 100644
--- a/io.c
+++ b/io.c
@@ -4020,6 +4020,7 @@ rb_io_close(VALUE io)
rb_thread_fd_close(fd);
if (fptr->pid) {
+ rb_last_status_clear();
rb_syswait(fptr->pid);
fptr->pid = 0;
}