ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ???????????????????????????????????? ???????????????????????????????????? ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ???????????????????????????????????? ???????????????????????????????????? U:RDoc::AnyMethod[iI" capture2:ETI"Open3#capture2;TF: privateo:RDoc::Markup::Document: @parts[/o:RDoc::Markup::Paragraph; [I"/Basically a wrapper for Open3.popen3 that:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"OCreates a child process, by calling Open3.popen3 with the given arguments ;TI"?(except for certain entries in hash +options+; see below).;To;;0; [o; ; [I"KReturns as string +stdout_s+ the standard output of the child process.;To;;0; [o; ; [I";Returns as +status+ a Process::Status object ;TI":that represents the exit status of the child process.;T@o; ; [I"3Returns the array [stdout_s, status]:;T@o:RDoc::Markup::Verbatim; [I"5stdout_s, status = Open3.capture2('echo "Foo"') ;TI"<# => ["Foo\n", #] ;T: @format0o; ; [I"LLike Process.spawn, this method has potential security vulnerabilities ;TI"%if called with untrusted input; ;TI"Psee {Command Injection}[rdoc-ref:command_injection.rdoc@Command+Injection].;T@o; ; [I"KUnlike Process.spawn, this method waits for the child process to exit ;TI"4before returning, so the caller need not do so.;T@o; ; [I"HIf the first argument is a hash, it becomes leading argument +env+ ;TI""in the call to Open3.popen3; ;TI"Isee {Execution Environment}[rdoc-ref:Process@Execution+Environment].;T@o; ; [I"LIf the last argument is a hash, it becomes trailing argument +options+ ;TI""in the call to Open3.popen3; ;TI"Asee {Execution Options}[rdoc-ref:Process@Execution+Options].;T@o; ; [I""The hash +options+ is given; ;TI"options[:stdin_data] exists, the entry is removed ;TI"Band its string value is sent to the command's standard input:;T@o;; [I".Open3.capture2('tee', stdin_data: 'Foo') ;TI" ;TI":# => ["Foo", #] ;T;0o;;0; [o; ; [I"JIf entry options[:binmode] exists, the entry is removed and ;TI"1the internal streams are set to binary mode.;T@o; ; [I":The single required argument is one of the following:;T@o; ; ;;[o;;0; [o; ; [I"'+command_line+ if it is a string, ;TI"Fand if it begins with a shell reserved word or special built-in, ;TI"2or if it contains one or more metacharacters.;To;;0; [o; ; [I"+exe_path+ otherwise.;T@o; ; [I"#Argument +command_line+;T@o; ; [I"P\String argument +command_line+ is a command line to be passed to a shell; ;TI"Nit must begin with a shell reserved word, begin with a special built-in, ;TI" or contain meta characters:;T@o;; [ I"KOpen3.capture2('if true; then echo "Foo"; fi') # Shell reserved word. ;TI"<# => ["Foo\n", #] ;TI"@Open3.capture2('echo') # Built-in. ;TI"9# => ["\n", #] ;TI"OOpen3.capture2('date > date.tmp') # Contains meta character. ;TI"7# => ["", #] ;T;0o; ; [I"MThe command line may also contain arguments and options for the command:;T@o;; [I""Open3.capture2('echo "Foo"') ;TI"<# => ["Foo\n", #] ;T;0o; ; [I"Argument +exe_path+;T@o; ; [I"1Argument +exe_path+ is one of the following:;T@o; ; ;;[o;;0; [o; ; [I"3The string path to an executable to be called.;To;;0; [o; ; [I" ["Fri Sep 29 01:00:39 PM CDT 2023\n", #] ;T;0o; ; [I"PRuby invokes the executable directly, with no shell and no shell expansion:;T@o;; [I";Open3.capture2('doesnt_exist') # Raises Errno::ENOENT ;T;0o; ; [I"CIf one or more +args+ is given, each is an argument or option ;TI"$to be passed to the executable:;T@o;; [ I"#Open3.capture2('echo', 'C #') ;TI"<# => ["C #\n", #] ;TI".Open3.capture2('echo', 'hello', 'world') ;TI"C# => ["hello world\n", #];T;0: @fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below0I"Open3.capture2([env, ] command_line, options = {}) -> [stdout_s, status] Open3.capture2([env, ] exe_path, *args, options = {}) -> [stdout_s, status] ;T0[I" (*cmd);T@FI" Open3;TcRDoc::NormalModule00