From add8e1f5bb59dc8aa35d0493b19af3bebe4e4876 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 21 Mar 2015 06:01:29 +0000 Subject: console.c: winsize on Windows * ext/io/console/console.c (console_set_winsize): use handle for writing. GetConsoleScreenBufferInfo seems failing on a handle for reading. * io.c: [DOC] update the example of IO#winsize to use $stdout instead of $stdin, which does not work on Windows. a patch by Jan Lelis at [ruby-core:68574]. [Bug #10986] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'io.c') diff --git a/io.c b/io.c index 3ac591a..1d3677a 100644 --- a/io.c +++ b/io.c @@ -12078,7 +12078,7 @@ rb_readwrite_sys_fail(int writable, const char *mesg) * Example: * * require 'io/console' - * rows, columns = $stdin.winsize + * rows, columns = $stdout.winsize * puts "Your screen is #{columns} wide and #{rows} tall" */ -- cgit v1.1