summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/io.c b/io.c
index 7085acf467..680659e333 100644
--- a/io.c
+++ b/io.c
@@ -638,7 +638,8 @@ static void
io_fd_check_closed(int fd)
{
if (fd < 0) {
- rb_raise(rb_eIOError, closed_stream);
+ rb_thread_check_ints(); /* check for ruby_error_stream_closed */
+ rb_raise(rb_eIOError, closed_stream);
}
}