summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--io.c6
-rw-r--r--version.h2
3 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 3014fd89b8..0b9af79782 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Feb 6 16:31:16 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * io.c (io_fwrite): call rb_w32_write_console() only if FMODE_TTY is
+ set. this is the one of the reason of IO writing slowness of Windows
+ in 1.9.3 or later.
+
Mon Feb 6 16:21:57 2012 NARUSE, Yui <naruse@ruby-lang.org>
* file.c (file_expand_path): reset coderange after expanding path.
diff --git a/io.c b/io.c
index 69c3c9e6eb..794f6de60b 100644
--- a/io.c
+++ b/io.c
@@ -936,8 +936,10 @@ 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;
+ if (fptr->mode & FMODE_TTY) {
+ 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),
diff --git a/version.h b/version.h
index 0acef7be33..bbbbeb5947 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.3"
-#define RUBY_PATCHLEVEL 33
+#define RUBY_PATCHLEVEL 34
#define RUBY_RELEASE_DATE "2012-02-06"
#define RUBY_RELEASE_YEAR 2012