ruby-changes:25519
From: knu <ko1@a...>
Date: Fri, 9 Nov 2012 15:25:16 +0900 (JST)
Subject: [ruby-changes:25519] knu:r37576 (trunk): Fix an example of Shellwords#shellescape.
knu 2012-11-09 15:25:02 +0900 (Fri, 09 Nov 2012) New Revision: 37576 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=37576 Log: 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. Modified files: trunk/ChangeLog trunk/lib/shellwords.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 37575) +++ ChangeLog (revision 37576) @@ -1,3 +1,9 @@ +Fri Nov 9 15:13:16 2012 Akinori MUSHA <knu@i...> + + * 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@r...> * string.c (rb_str_crypt): crypt(3) may return NULL. Index: lib/shellwords.rb =================================================================== --- lib/shellwords.rb (revision 37575) +++ lib/shellwords.rb (revision 37576) @@ -155,9 +155,7 @@ # # 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(' ') -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/