summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-14 04:28:06 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-14 04:28:06 +0000
commit34bda680b75141d912b33e6a9f43b656011b3e1e (patch)
tree75b55aa96198919e27de27df58371fd87d687bed /lib
parent90dc4551510a8d608b81a93c4a6c9e211013ce30 (diff)
merge revision(s) 25009:
* lib/open3.rb (Open3#popen3): fixed and improved rdoc. [ruby-core:25658] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@26095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/open3.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/open3.rb b/lib/open3.rb
index c4dacc9473..fca0257cdd 100644
--- a/lib/open3.rb
+++ b/lib/open3.rb
@@ -33,7 +33,7 @@ module Open3
#
# require 'open3'
#
- # [stdin, stdout, stderr] = Open3.popen3(cmd)
+ # stdin, stdout, stderr = Open3.popen3(cmd)
#
# Block form:
#
@@ -43,6 +43,12 @@ module Open3
#
# The parameter +cmd+ is passed directly to Kernel#exec.
#
+ # _popen3_ is like _system_ in that you can pass extra parameters, and the
+ # strings won't be mangled by shell expansion.
+ #
+ # stdin, stdout, stderr = Open3.popen3('identify', '/weird path/with spaces/and "strange" characters.jpg')
+ # result = stdout.read
+ #
def popen3(*cmd)
pw = IO::pipe # pipe[0] for read, pipe[1] for write
pr = IO::pipe