about summary refs log tree commit homepage
path: root/ext/mwrap/mwrap.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mwrap/mwrap.c')
-rw-r--r--ext/mwrap/mwrap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/mwrap/mwrap.c b/ext/mwrap/mwrap.c
index 3f59f11..c160e33 100644
--- a/ext/mwrap/mwrap.c
+++ b/ext/mwrap/mwrap.c
@@ -346,6 +346,7 @@ static VALUE mwrap_dump(int argc, VALUE * argv, VALUE mod)
                 io = *((VALUE *)dlsym(RTLD_DEFAULT, "rb_stderr"));
 
         a.min = NIL_P(min) ? 0 : NUM2SIZET(min);
+        io = rb_io_get_io(io);
         io = rb_io_get_write_io(io);
         GetOpenFile(io, fptr);
         a.fp = rb_io_stdio_file(fptr);