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 88811a9387..88979332ef 100644
--- a/io.c
+++ b/io.c
@@ -271,6 +271,7 @@ VALUE
rb_io_get_write_io(VALUE io)
{
VALUE write_io;
+ rb_io_check_initialized(RFILE(io)->fptr);
write_io = RFILE(io)->fptr->tied_io_for_writing;
if (write_io) {
return write_io;