ruby-changes:22237
From: knu <ko1@a...>
Date: Fri, 13 Jan 2012 03:49:38 +0900 (JST)
Subject: [ruby-changes:22237] knu:r34286 (trunk): * lib/shellwords.rb: Fix rdoc markups.
knu 2012-01-13 03:49:27 +0900 (Fri, 13 Jan 2012) New Revision: 34286 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34286 Log: * lib/shellwords.rb: Fix rdoc markups. Modified files: trunk/ChangeLog trunk/lib/shellwords.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 34285) +++ ChangeLog (revision 34286) @@ -1,3 +1,7 @@ +Fri Jan 13 03:46:53 2012 Akinori MUSHA <knu@i...> + + * lib/shellwords.rb: Fix rdoc markups. + Fri Jan 13 03:38:36 2012 Akinori MUSHA <knu@i...> * lib/shellwords.rb (Shellwords#shellsplit): Fix a bug where Index: lib/shellwords.rb =================================================================== --- lib/shellwords.rb (revision 34285) +++ lib/shellwords.rb (revision 34286) @@ -23,18 +23,16 @@ # * Akinori MUSHA <knu@i...> (current maintainer) module Shellwords - # # Splits a string into an array of tokens in the same way the UNIX # Bourne shell does. # # argv = Shellwords.split('here are "two words"') # argv #=> ["here", "are", "two words"] # - # +String#shellsplit+ is a shorthand for this function. + # String#shellsplit is a shorthand for this function. # # argv = 'here are "two words"'.shellsplit # argv #=> ["here", "are", "two words"] - # def shellsplit(line) words = [] field = '' @@ -58,7 +56,6 @@ alias split shellsplit end - # # Escapes a string so that it can be safely used in a Bourne shell # command line. # @@ -69,7 +66,7 @@ # # ... # } # - # +String#shellescape+ is a shorthand for this function. + # String#shellescape is a shorthand for this function. # # open("| grep #{pattern.shellescape} file") { |pipe| # # ... @@ -79,7 +76,6 @@ # encoding for the shell environment where this string is used. # Multibyte characters are treated as multibyte characters, not # bytes. - # def shellescape(str) # An empty argument will be skipped, so return empty quotes. return "''" if str.empty? @@ -104,7 +100,6 @@ alias escape shellescape end - # # Builds a command line string from an argument list +array+ joining # all elements escaped for Bourne shell and separated by a space. # @@ -112,7 +107,7 @@ # # ... # } # - # +Array#shelljoin+ is a shorthand for this function. + # Array#shelljoin is a shorthand for this function. # # open('|' + ['grep', pattern, *files].shelljoin) { |pipe| # # ... @@ -130,38 +125,32 @@ end class String - # # call-seq: # str.shellsplit => array # # Splits +str+ into an array of tokens in the same way the UNIX - # Bourne shell does. See +Shellwords::shellsplit+ for details. - # + # Bourne shell does. See Shellwords::shellsplit for details. def shellsplit Shellwords.split(self) end - # # call-seq: # str.shellescape => string # # Escapes +str+ so that it can be safely used in a Bourne shell - # command line. See +Shellwords::shellescape+ for details. - # + # command line. See Shellwords::shellescape for details. def shellescape Shellwords.escape(self) end end class Array - # # call-seq: # array.shelljoin => string # # Builds a command line string from an argument list +array+ joining # all elements escaped for Bourne shell and separated by a space. - # See +Shellwords::shelljoin+ for details. - # + # See Shellwords::shelljoin for details. def shelljoin Shellwords.join(self) end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/