summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-18 14:33:31 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-18 14:33:31 +0000
commit95c85c3ff65c2dfc4b0533f3e285c5ab977a4273 (patch)
tree212bbdfa48746a197f1bf01de48e5c24414ac9fe /ext
parent9b872832a1417e792b85e6aa33099ae0a3ca82cf (diff)
downloadruby-95c85c3ff65c2dfc4b0533f3e285c5ab977a4273.tar.gz
ruby-95c85c3ff65c2dfc4b0533f3e285c5ab977a4273.tar.xz
ruby-95c85c3ff65c2dfc4b0533f3e285c5ab977a4273.zip
rdoc update.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/pty/pty.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/ext/pty/pty.c b/ext/pty/pty.c
index ce4acbb29..c44953ca1 100644
--- a/ext/pty/pty.c
+++ b/ext/pty/pty.c
@@ -450,12 +450,18 @@ pty_close_pty(VALUE assoc)
* 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