From eccb95543cd9cfa26daaeacd5c4e44672286948d Mon Sep 17 00:00:00 2001 From: knu Date: Fri, 9 Nov 2012 06:25:02 +0000 Subject: 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 --- lib/shellwords.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/shellwords.rb') 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(' ') -- cgit v1.2.3