mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9ef4a0aa52
commit
48c7c84e46
1 changed files with 5 additions and 5 deletions
10
lib/open3.rb
10
lib/open3.rb
|
@ -55,9 +55,9 @@ module Open3
|
||||||
# The parameters +cmd...+ is passed to Process.spawn.
|
# The parameters +cmd...+ is passed to Process.spawn.
|
||||||
# So a commandline string and list of argument strings can be accepted as follows.
|
# So a commandline string and list of argument strings can be accepted as follows.
|
||||||
#
|
#
|
||||||
# Open3.popen3("echo a") {|i, o, e, t| ... }
|
# Open3.popen3("echo abc") {|i, o, e, t| ... }
|
||||||
# Open3.popen3("echo", "a") {|i, o, e, t| ... }
|
# Open3.popen3("echo", "abc") {|i, o, e, t| ... }
|
||||||
# Open3.popen3(["echo", "argv0"], "a") {|i, o, e, t| ... }
|
# Open3.popen3(["echo", "argv0"], "abc") {|i, o, e, t| ... }
|
||||||
#
|
#
|
||||||
# If the last parameter, opts, is a Hash, it is recognized as an option for Process.spawn.
|
# If the last parameter, opts, is a Hash, it is recognized as an option for Process.spawn.
|
||||||
#
|
#
|
||||||
|
@ -248,8 +248,8 @@ module Open3
|
||||||
# End
|
# End
|
||||||
# layouted_graph, dot_log = Open3.capture3("dot -v", :stdin_data=>graph)
|
# layouted_graph, dot_log = Open3.capture3("dot -v", :stdin_data=>graph)
|
||||||
#
|
#
|
||||||
# o, e, s = Open3.capture3("echo a; sort >&2", :stdin_data=>"foo\nbar\nbaz\n")
|
# o, e, s = Open3.capture3("echo abc; sort >&2", :stdin_data=>"foo\nbar\nbaz\n")
|
||||||
# p o #=> "a\n"
|
# p o #=> "abc\n"
|
||||||
# p e #=> "bar\nbaz\nfoo\n"
|
# p e #=> "bar\nbaz\nfoo\n"
|
||||||
# p s #=> #<Process::Status: pid 32682 exit 0>
|
# p s #=> #<Process::Status: pid 32682 exit 0>
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue