ruby-changes:20019
From: nobu <ko1@a...>
Date: Mon, 13 Jun 2011 23:33:50 +0900 (JST)
Subject: [ruby-changes:20019] nobu:r32066 (trunk): * ext/io/console/console.c (console_dev): console should be
nobu 2011-06-13 23:33:36 +0900 (Mon, 13 Jun 2011) New Revision: 32066 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32066 Log: * ext/io/console/console.c (console_dev): console should be unbuffered. Modified files: trunk/ChangeLog trunk/ext/io/console/console.c trunk/test/io/console/test_io_console.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 32065) +++ ChangeLog (revision 32066) @@ -1,5 +1,8 @@ -Mon Jun 13 23:28:50 2011 Nobuyoshi Nakada <nobu@r...> +Mon Jun 13 23:33:31 2011 Nobuyoshi Nakada <nobu@r...> + * ext/io/console/console.c (console_dev): console should be + unbuffered. + * ext/io/console/console.c (console_dev): take care of no-ctty case. Index: ext/io/console/console.c =================================================================== --- ext/io/console/console.c (revision 32065) +++ ext/io/console/console.c (revision 32066) @@ -587,7 +587,9 @@ fptr->f2 = ofptr->f; ofptr->f = 0; # endif + optr->mode |= FMODE_SYNC; #endif + fptr->mode |= FMODE_SYNC; rb_const_set(klass, id_console, con); } return con; Index: test/io/console/test_io_console.rb =================================================================== --- test/io/console/test_io_console.rb (revision 32065) +++ test/io/console/test_io_console.rb (revision 32066) @@ -148,6 +148,10 @@ } end + def test_sync + assert(helper {IO.console.sync}, "console should be unbuffered") + end + private def helper m, s = PTY.open -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/