ruby-changes:9314
From: akr <ko1@a...>
Date: Thu, 18 Dec 2008 00:48:40 +0900 (JST)
Subject: [ruby-changes:9314] Ruby:r20852 (trunk): rdoc update.
akr 2008-12-18 00:48:22 +0900 (Thu, 18 Dec 2008) New Revision: 20852 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20852 Log: rdoc update. Modified files: trunk/ext/pty/pty.c Index: ext/pty/pty.c =================================================================== --- ext/pty/pty.c (revision 20851) +++ ext/pty/pty.c (revision 20852) @@ -452,19 +452,20 @@ * * The filename of the slave is slave_file.path. * - * # make cut's stdout line buffered. - * # if IO.pipe is used instead of PTY.open, - * # this deadlocks because cut's stdout will be fully buffered. - * m, s = PTY.open + * # Change the buffering type in factor command, + * # assuming that it uses stdio for stdout buffering. + * # If IO.pipe is used instead of PTY.open, + * # this deadlocks because factor's stdout is fully buffered. + * m, s = PTY.open * system("stty raw", :in=>s) # disable newline conversion. * r, w = IO.pipe - * pid = spawn("cut -c 3-8", :in=>r, :out=>s) + * pid = spawn("factor", :in=>r, :out=>s) * r.close * s.close - * w.puts "foo bar baz" #=> "o bar \n" - * p m.gets - * w.puts "hoge fuga moge" #=> "ge fug\n" - * p m.gets + * w.puts "42" + * p m.gets #=> "42: 2 3 7\n" + * w.puts "144" + * p m.gets #=> "144: 2 2 2 2 3 3\n" * */ static VALUE -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/