diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-09 06:25:02 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-09 06:25:02 +0000 |
commit | eccb95543cd9cfa26daaeacd5c4e44672286948d (patch) | |
tree | e1488c2be372f5a2c607bd0d30752518d3b2fe8a | |
parent | dfb44feefeb837bae561769e5f1a30276e70b0a8 (diff) | |
download | ruby-eccb95543cd9cfa26daaeacd5c4e44672286948d.tar.gz |
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
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | lib/shellwords.rb | 4 |
2 files changed, 7 insertions, 3 deletions
@@ -1,3 +1,9 @@ +Fri Nov 9 15:13:16 2012 Akinori MUSHA <knu@iDaemons.org> + + * 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. + Fri Nov 9 12:58:13 2012 NARUSE, Yui <naruse@ruby-lang.org> * string.c (rb_str_crypt): crypt(3) may return NULL. 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(' ') |