Backport #2125
closedOpen.popen3 documentation has a small bug
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
Updated by epitron (Chris G) over 14 years ago
=begin
Whoops, I left out a comma.
stdin, stdout, stderr = Open3.popen3('identify', '/weird path/with spaces/and "strange" characters.jpg')
result = stdout.read
:)
=end
Updated by nobu (Nobuyoshi Nakada) over 14 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
=begin
Applied in changeset r25009.
=end
Updated by nobu (Nobuyoshi Nakada) over 14 years ago
- Status changed from Closed to Assigned
- Assignee set to shyouhei (Shyouhei Urabe)
=begin
=end
Updated by shyouhei (Shyouhei Urabe) over 14 years ago
- Status changed from Assigned to Closed
=begin
This issue was solved with changeset r26095.
Chris, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end