diff options
| author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-08-04 22:00:31 +0000 |
|---|---|---|
| committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-08-04 22:00:31 +0000 |
| commit | 143f8a86a46b7ec38ad5382b8fe00e80785c1212 (patch) | |
| tree | 3ebfb81d7fdc03904604b2c7148180d7c6b02cec /lib/open3.rb | |
| parent | af5d40cde2072fbe74e2d5017cc9fa147c0b7d24 (diff) | |
| download | ruby-143f8a86a46b7ec38ad5382b8fe00e80785c1212.tar.gz ruby-143f8a86a46b7ec38ad5382b8fe00e80785c1212.tar.xz ruby-143f8a86a46b7ec38ad5382b8fe00e80785c1212.zip | |
Merge RDoc changes from HEAD.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@10679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/open3.rb')
| -rw-r--r-- | lib/open3.rb | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/lib/open3.rb b/lib/open3.rb index 59db1a4cc..f722252b1 100644 --- a/lib/open3.rb +++ b/lib/open3.rb @@ -3,12 +3,24 @@ # which IO#popen does not allow) # # Usage: -# require "open3" # -# stdin, stdout, stderr = Open3.popen3('nroff -man') -# or -# include Open3 -# stdin, stdout, stderr = popen3('nroff -man') +# require "open3" +# +# stdin, stdout, stderr = Open3.popen3('nroff -man') +# +# or: +# +# include Open3 +# +# stdin, stdout, stderr = popen3('nroff -man') +# +# popen3 can also take a block which will receive stdin, stdout and stderr as +# parameters. This ensures stdin, stdout and stderr are closed once the block +# exits. +# +# Such as: +# +# Open3.popen3('nroff -man') { |stdin, stdout, stderr| ... } module Open3 #[stdin, stdout, stderr] = popen3(command); |
