From f5cb914f38ab7515e1627743a22a6b90a3e2de6b Mon Sep 17 00:00:00 2001 From: akr Date: Thu, 4 Dec 2008 14:35:19 +0000 Subject: rdoc update. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/open3.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib') diff --git a/lib/open3.rb b/lib/open3.rb index 7bf330c82..e70aaca6e 100644 --- a/lib/open3.rb +++ b/lib/open3.rb @@ -195,6 +195,13 @@ module Open3 # # If opts[:stdin_data] is specified, it is sent to the command's standard input. # + # Example: + # + # o, e, s = Open3.poutput3("echo a; sort >&2", :stdin_data=>"foo\nbar\nbaz\n") + # p o #=> "a\n" + # p e #=> "bar\nbaz\nfoo\n" + # p s #=> # + # def poutput3(*cmd, &block) if Hash === cmd.last opts = cmd.pop.dup -- cgit