summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-09 06:25:02 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-09 06:25:02 +0000
commiteccb95543cd9cfa26daaeacd5c4e44672286948d (patch)
treee1488c2be372f5a2c607bd0d30752518d3b2fe8a /lib
parentdfb44feefeb837bae561769e5f1a30276e70b0a8 (diff)
Fix an example of Shellwords#shellescape.
* lib/shellwords.rb (Shellwords#shellescape): Undo part of the previous rdoc change. This new example using a string-only array was not in line with the description. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/shellwords.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/shellwords.rb b/lib/shellwords.rb
index c55644ca75..fede2e1874 100644
--- a/lib/shellwords.rb
+++ b/lib/shellwords.rb
@@ -155,9 +155,7 @@ module Shellwords
#
# You can also mix non-string objects in the elements as allowed in Array#join.
#
- # ary = ["All", "work", "and", "no", "play", "makes", $0, "a", "dull", "boy"]
- # argv = ary.shelljoin
- # argv #=> "All work and no play makes irb a dull boy"
+ # output = `#{['ps', '-p', $$].shelljoin}`
#
def shelljoin(array)
array.map { |arg| shellescape(arg) }.join(' ')