[前][次][番号順一覧][スレッド一覧]

ruby-changes:21343

From: drbrain <ko1@a...>
Date: Tue, 4 Oct 2011 08:23:35 +0900 (JST)
Subject: [ruby-changes:21343] drbrain:r33392 (trunk): * lib/shellwords.rb: Update toplevel comment with an example. Patch

drbrain	2011-10-04 08:23:24 +0900 (Tue, 04 Oct 2011)

  New Revision: 33392

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=33392

  Log:
    * lib/shellwords.rb:  Update toplevel comment with an example.  Patch
      by Samnang Chhun.  [Ruby 1.9 - Bug #5388]

  Modified files:
    trunk/ChangeLog
    trunk/lib/shellwords.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 33391)
+++ ChangeLog	(revision 33392)
@@ -1,3 +1,8 @@
+Tue Oct  4 08:21:51 2011  Eric Hodel  <drbrain@s...>
+
+	* lib/shellwords.rb:  Update toplevel comment with an example.  Patch
+	  by Samnang Chhun.  [Ruby 1.9 - Bug #5388]
+
 Tue Oct  4 08:15:50 2011  Eric Hodel  <drbrain@s...>
 
 	* proc.c (proc_call):  Update documentation to match argument handling
Index: lib/shellwords.rb
===================================================================
--- lib/shellwords.rb	(revision 33391)
+++ lib/shellwords.rb	(revision 33392)
@@ -1,21 +1,27 @@
+##
+# = Manipulates strings like the UNIX Bourne shell
 #
-# shellwords.rb: Manipulates strings a la UNIX Bourne shell
-#
-
-#
 # This module manipulates strings according to the word parsing rules
 # of the UNIX Bourne shell.
 #
 # The shellwords() function was originally a port of shellwords.pl,
 # but modified to conform to POSIX / SUSv3 (IEEE Std 1003.1-2001).
 #
-# Authors:
-#   - Wakou Aoyama
-#   - Akinori MUSHA <knu@i...>
+# == Example
 #
-# Contact:
-#   - Akinori MUSHA <knu@i...> (current maintainer)
+#   argv = Shellwords.split('here are "two words"') # or String#shellsplit
+#   argv #=> ["here", "are", "two words"]
 #
+#   argv = Shellwords.escape("special's.txt") # or String#shellescape
+#   system("cat " + argv)
+#
+# == Authors:
+# * Wakou Aoyama
+# * Akinori MUSHA <knu@i...>
+#
+# == Contact:
+# * Akinori MUSHA <knu@i...> (current maintainer)
+
 module Shellwords
   #
   # Splits a string into an array of tokens in the same way the UNIX

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]