diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-07 10:34:25 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-07 10:34:25 +0000 |
commit | 7c20c4ec02e5cf3da75954b17fa4a9bb303414eb (patch) | |
tree | e371e7a64e3a5cd1a97e9c2416c0c8eee60ee00a | |
parent | c0264efadda2353455ef1d009c258f1cb8fda5bb (diff) | |
download | ruby-7c20c4ec02e5cf3da75954b17fa4a9bb303414eb.tar.gz |
rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | lib/open3.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/open3.rb b/lib/open3.rb index c29a622c1b..459bee4607 100644 --- a/lib/open3.rb +++ b/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 |