ruby-changes:17963
From: usa <ko1@a...>
Date: Tue, 30 Nov 2010 12:26:55 +0900 (JST)
Subject: [ruby-changes:17963] Ruby:r29980 (trunk): * win32/win32.c (rb_w32_read): read only 1 byte at once on console.
usa 2010-11-30 12:26:43 +0900 (Tue, 30 Nov 2010) New Revision: 29980 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29980 Log: * win32/win32.c (rb_w32_read): read only 1 byte at once on console. workaround of Windows bug. see [ruby-core:33460]. this is not the final solution. Modified files: trunk/ChangeLog trunk/win32/win32.c Index: ChangeLog =================================================================== --- ChangeLog (revision 29979) +++ ChangeLog (revision 29980) @@ -1,3 +1,9 @@ +Tue Nov 30 12:23:52 2010 NAKAMURA Usaku <usa@r...> + + * win32/win32.c (rb_w32_read): read only 1 byte at once on console. + workaround of Windows bug. see [ruby-core:33460]. + this is not the final solution. + Tue Nov 30 11:39:13 2010 NARUSE, Yui <naruse@r...> * lib/net/http.rb: improve rdoc. Index: win32/win32.c =================================================================== --- win32/win32.c (revision 29979) +++ win32/win32.c (revision 29980) @@ -5027,6 +5027,7 @@ size_t len; size_t ret; OVERLAPPED ol, *pol = NULL; + BOOL isconsole; int start = 0; if (is_socket(sock)) @@ -5049,11 +5050,12 @@ } ret = 0; + isconsole = is_console(_osfhnd(fd)); retry: /* get rid of console reading bug */ - if (is_console(_osfhnd(fd))) { + if (isconsole) { if (start) - len = min(16 * 1024, size); + len = 1; else { len = 0; start = 1; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/