summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-17 15:48:22 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-17 15:48:22 +0000
commit8d610c139d222b2d285ad79690a1ebb4a813e5c4 (patch)
tree966547e6020052c365432446cfba50ce6c74389f /ext
parentf55973b95a7c78282e41f864f1228746d5bf02fc (diff)
downloadruby-8d610c139d222b2d285ad79690a1ebb4a813e5c4.tar.gz
ruby-8d610c139d222b2d285ad79690a1ebb4a813e5c4.tar.xz
ruby-8d610c139d222b2d285ad79690a1ebb4a813e5c4.zip
rdoc update.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/pty/pty.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/ext/pty/pty.c b/ext/pty/pty.c
index 0044c5bbb..ce4acbb29 100644
--- a/ext/pty/pty.c
+++ b/ext/pty/pty.c
@@ -452,19 +452,20 @@ pty_close_pty(VALUE assoc)
*
* 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