diff --git a/ChangeLog b/ChangeLog index e09f7a20c5..a3d1706543 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Fri Nov 9 15:13:16 2012 Akinori MUSHA + + * 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 * 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(' ')