summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-07 10:34:25 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-07 10:34:25 +0000
commit2e1c0e8ee78a56ac809e687db8280af6b3a3c1d4 (patch)
treee371e7a64e3a5cd1a97e9c2416c0c8eee60ee00a /lib
parentc327820a676ff468a90af29a820da2fb0e9a0bdf (diff)
downloadruby-2e1c0e8ee78a56ac809e687db8280af6b3a3c1d4.tar.gz
ruby-2e1c0e8ee78a56ac809e687db8280af6b3a3c1d4.tar.xz
ruby-2e1c0e8ee78a56ac809e687db8280af6b3a3c1d4.zip
rdoc update.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/open3.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/open3.rb b/lib/open3.rb
index c29a622c1..459bee460 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