mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c0264efadd
commit
7c20c4ec02
1 changed files with 11 additions and 0 deletions
11
lib/open3.rb
11
lib/open3.rb
|
@ -163,6 +163,17 @@ module Open3
|
|||
# stdin.close # stdin and stdout_and_stderr should be closed explicitly in this form.
|
||||
# stdout_and_stderr.close
|
||||
#
|
||||
# Example:
|
||||
# # check gcc warnings
|
||||
# source = "foo.c"
|
||||
# Open3.popen2e("gcc", "-Wall", source) {|i,oe,t|
|
||||
# oe.each {|line|
|
||||
# if /warning/ =~ line
|
||||
# ...
|
||||
# end
|
||||
# }
|
||||
# }
|
||||
#
|
||||
def popen2e(*cmd, &block)
|
||||
if Hash === cmd.last
|
||||
opts = cmd.pop.dup
|
||||
|
|
Loading…
Reference in a new issue