aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/io.c b/io.c
index afd4f3110e..8e1f1b826e 100644
--- a/io.c
+++ b/io.c
@@ -961,6 +961,10 @@ do_writeconv(VALUE str, rb_io_t *fptr)
static long
io_fwrite(VALUE str, rb_io_t *fptr, int nosync)
{
+#ifdef _WIN32
+ long len = rb_w32_write_console(str, fptr->fd);
+ if (len > 0) return len;
+#endif
str = do_writeconv(str, fptr);
return io_binwrite(str, RSTRING_PTR(str), RSTRING_LEN(str),
fptr, nosync);