D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Shellwords
/
Filename :
shelljoin-i.ri
back
Copy
U:RDoc::AnyMethod[iI"shelljoin:ETI"Shellwords#shelljoin;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"ABuilds a command line string from an argument list, +array+.;To:RDoc::Markup::BlankLine o; ; [ I"MAll elements are joined into a single string with fields separated by a ;TI"Ospace, where each element is escaped for the Bourne shell and stringified ;TI"using +to_s+. ;TI"%See also Shellwords.shellescape.;T@o:RDoc::Markup::Verbatim; [I"Iary = ["There's", "a", "time", "and", "place", "for", "everything"] ;TI"!argv = Shellwords.join(ary) ;TI":argv #=> "There\\'s a time and place for everything" ;T:@format0o; ; [I"5Array#shelljoin is a shortcut for this function.;T@o;; [I",ary = ["Don't", "rock", "the", "boat"] ;TI"argv = ary.shelljoin ;TI"&argv #=> "Don\\'t rock the boat" ;T; 0o; ; [I"RYou can also mix non-string objects in the elements as allowed in Array#join.;T@o;; [I"-output = `#{['ps', '-p', $$].shelljoin}`;T; 0: @fileI"lib/shellwords.rb;T:0@omit_headings_from_table_of_contents_below000[[I" join;To;; [ ;@(;0I"(array);T@(FI"Shellwords;TcRDoc::NormalModule00