Project

General

Profile

This project is closed and read-only.

Actions

Backport #2125

closed

Open.popen3 documentation has a small bug

Backport #2125: Open.popen3 documentation has a small bug

Added by epitron (Chris G) about 17 years ago. Updated over 15 years ago.


Description

=begin
This documentation has a small glitch:
http://www.ruby-doc.org/stdlib/libdoc/open3/rdoc/classes/Open3.html

The example in the docs for the module itself is valid:

stdin, stdout, stderr = popen3('nroff -man')

But the example in the method docs is not:
[stdin, stdout, stderr] = Open3.popen3(cmd)

Those []'s are mad mojo, man...

Also, it would probably be good to mention that popen3 is like system in that you can pass extra parameters, and the strings won't be mangled by shell expansion. eg:

stdin, stdout, stderr = Open3.popen3('identify' '/weird path/with spaces/and "strange" characters.jpg')
result = stdout.read
=end

Actions

Also available in: PDF Atom