[前][次][番号順一覧][スレッド一覧]

ruby-changes:9325

From: akr <ko1@a...>
Date: Thu, 18 Dec 2008 23:33:40 +0900 (JST)
Subject: [ruby-changes:9325] Ruby:r20863 (trunk): rdoc update.

akr	2008-12-18 23:33:31 +0900 (Thu, 18 Dec 2008)

  New Revision: 20863

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20863

  Log:
    rdoc update.

  Modified files:
    trunk/ext/pty/pty.c

Index: ext/pty/pty.c
===================================================================
--- ext/pty/pty.c	(revision 20862)
+++ ext/pty/pty.c	(revision 20863)
@@ -450,12 +450,18 @@
  * The value of the block is returned.
  * master_io and slave_file is closed when return if they are not closed.
  *
- * The filename of the slave is slave_file.path.
+ * The filename of the slave_file is slave_file.path.
  *
+ *   PTY.open {|m, s|
+ *     p m      #=> #<IO: pty /dev/pts/1>
+ *     p s      #=> #<File:/dev/pts/1>
+ *     p s.path #=> "/dev/pts/1"
+ *   }
+ *
  *   # Change the buffering type in factor command,
- *   # assuming that it uses stdio for stdout buffering.
+ *   # assuming that factor uses stdio for stdout buffering.
  *   # If IO.pipe is used instead of PTY.open,
- *   # this deadlocks because factor's stdout is fully buffered.
+ *   # this code deadlocks because factor's stdout is fully buffered.
  *   m, s = PTY.open
  *   system("stty raw", :in=>s) # disable newline conversion.
  *   r, w = IO.pipe

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]