ruby-changes:22387
From: usa <ko1@a...>
Date: Mon, 6 Feb 2012 16:36:21 +0900 (JST)
Subject: [ruby-changes:22387] usa:r34436 (ruby_1_9_3): merge revision(s) 33667:
usa 2012-02-06 16:32:09 +0900 (Mon, 06 Feb 2012) New Revision: 34436 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34436 Log: merge revision(s) 33667: * 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. [Backport #5592] Modified files: branches/ruby_1_9_3/ChangeLog branches/ruby_1_9_3/io.c branches/ruby_1_9_3/version.h Index: ruby_1_9_3/ChangeLog =================================================================== --- ruby_1_9_3/ChangeLog (revision 34435) +++ ruby_1_9_3/ChangeLog (revision 34436) @@ -1,3 +1,9 @@ +Mon Feb 6 16:31:16 2012 NAKAMURA Usaku <usa@r...> + + * 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@r...> * file.c (file_expand_path): reset coderange after expanding path. Index: ruby_1_9_3/io.c =================================================================== --- ruby_1_9_3/io.c (revision 34435) +++ ruby_1_9_3/io.c (revision 34436) @@ -936,8 +936,10 @@ 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), Index: ruby_1_9_3/version.h =================================================================== --- ruby_1_9_3/version.h (revision 34435) +++ ruby_1_9_3/version.h (revision 34436) @@ -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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/