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

ruby-changes:21037

From: drbrain <ko1@a...>
Date: Sat, 27 Aug 2011 07:22:52 +0900 (JST)
Subject: [ruby-changes:21037] drbrain:r33086 (trunk): * ext/pathname/lib/pathname.rb: Fix typos and grammar mistakes. Patch

drbrain	2011-08-27 07:22:37 +0900 (Sat, 27 Aug 2011)

  New Revision: 33086

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

  Log:
    * ext/pathname/lib/pathname.rb:  Fix typos and grammar mistakes.  Patch
      by Luke Gruber.  [#5203]
    * ext/pty/lib/expect.rb:  ditto
    * lib/mathn.rb:  ditto
    * lib/net/http.rb:  ditto
    * lib/open-uri.rb:  ditto
    * lib/ostruct.rb:  ditto
    * lib/tempfile.rb:  ditto
    * lib/thread.rb:  ditto
    * lib/weakref.rb:  ditto
    * sample/webrick/httpproxy.rb:  ditto

  Modified files:
    trunk/ChangeLog
    trunk/ext/pathname/lib/pathname.rb
    trunk/ext/pty/lib/expect.rb
    trunk/lib/mathn.rb
    trunk/lib/net/http.rb
    trunk/lib/open-uri.rb
    trunk/lib/ostruct.rb
    trunk/lib/tempfile.rb
    trunk/lib/thread.rb
    trunk/lib/weakref.rb
    trunk/sample/webrick/httpproxy.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 33085)
+++ ChangeLog	(revision 33086)
@@ -1,3 +1,17 @@
+Sat Aug 27 07:22:07 2011  Eric Hodel  <drbrain@s...>
+
+	* ext/pathname/lib/pathname.rb:  Fix typos and grammar mistakes.  Patch
+	  by Luke Gruber.  [#5203]
+	* ext/pty/lib/expect.rb:  ditto
+	* lib/mathn.rb:  ditto
+	* lib/net/http.rb:  ditto
+	* lib/open-uri.rb:  ditto
+	* lib/ostruct.rb:  ditto
+	* lib/tempfile.rb:  ditto
+	* lib/thread.rb:  ditto
+	* lib/weakref.rb:  ditto
+	* sample/webrick/httpproxy.rb:  ditto
+
 Sat Aug 27 04:03:18 2011  Koichi Sasada  <ko1@a...>
 
 	* iseq.c (iseq_data_to_ary): fix type of variable
Index: sample/webrick/httpproxy.rb
===================================================================
--- sample/webrick/httpproxy.rb	(revision 33085)
+++ sample/webrick/httpproxy.rb	(revision 33086)
@@ -1,10 +1,9 @@
 require "webrick"
 require "webrick/httpproxy"
 
-# :ProxyContentHandler will be invoked before sending
-# response to User-Agenge. You can inspect the pair of
-# request and response messages (or can edit the response
-# message if necessary).
+# The :ProxyContentHandler proc will be invoked before sending a response to
+# the User-Agent.  You can inspect the pair of request and response messages
+# (or edit the response message if necessary).
 
 pch = Proc.new{|req, res|
   p [ req.request_line, res.status_line ]
Index: lib/weakref.rb
===================================================================
--- lib/weakref.rb	(revision 33085)
+++ lib/weakref.rb	(revision 33086)
@@ -1,7 +1,7 @@
 require "delegate"
 require 'thread'
 
-# Weak Reference class that does allows a referenced object to be
+# Weak Reference class that allows a referenced object to be
 # garbage-collected.  A WeakRef may be used exactly like the object it
 # references.
 #
Index: lib/open-uri.rb
===================================================================
--- lib/open-uri.rb	(revision 33085)
+++ lib/open-uri.rb	(revision 33086)
@@ -9,21 +9,21 @@
     alias open_uri_original_open open # :nodoc:
   end
 
-  # makes possible to open various resources including URIs.
-  # If the first argument respond to `open' method,
-  # the method is called with the rest arguments.
+  # Allows the opening of various resources including URIs.
   #
-  # If the first argument is a string which begins with xxx://,
-  # it is parsed by URI.parse.  If the parsed object respond to `open' method,
-  # the method is called with the rest arguments.
+  # If the first argument responds to the 'open' method, 'open' is called on
+  # it with the rest of the arguments.
   #
-  # Otherwise original open is called.
+  # If the first argument is a string that begins with xxx://, it is parsed by
+  # URI.parse.  If the parsed object responds to the 'open' method,
+  # 'open' is called on it with the rest of the arguments.
   #
+  # Otherwise, the original Kernel#open is called.
+  #
   # Since open-uri.rb provides URI::HTTP#open, URI::HTTPS#open and
-  # URI::FTP#open,
-  # Kernel[#.]open can accepts such URIs and strings which begins with
-  # http://, https:// and ftp://.
-  # In these case, the opened file object is extended by OpenURI::Meta.
+  # URI::FTP#open, Kernel[#.]open can accept URIs and strings that begin with
+  # http://, https:// and ftp://.  In these cases, the opened file object is
+  # extended by OpenURI::Meta.
   def open(name, *rest, &block) # :doc:
     if name.respond_to?(:open)
       name.open(*rest, &block)
@@ -42,14 +42,14 @@
 #
 #== Example
 #
-# It is possible to open http/https/ftp URL as usual like opening a file:
+# It is possible to open an http, https or ftp URL as though it were a file:
 #
 #   open("http://www.ruby-lang.org/") {|f|
 #     f.each_line {|line| p line}
 #   }
 #
-# The opened file has several methods for meta information as follows since
-# it is extended by OpenURI::Meta.
+# The opened file has several getter methods for its meta-information, as
+# follows, since it is extended by OpenURI::Meta.
 #
 #   open("http://www.ruby-lang.org/en") {|f|
 #     f.each_line {|line| p line}
@@ -407,14 +407,14 @@
       end
     end
 
-    # returns an Array which consists status code and message.
+    # returns an Array that consists of status code and message.
     attr_accessor :status
 
-    # returns a URI which is base of relative URIs in the data.
-    # It may differ from the URI supplied by a user because redirection.
+    # returns a URI that is the base of relative URIs in the data.
+    # It may differ from the URI supplied by a user due to redirection.
     attr_accessor :base_uri
 
-    # returns a Hash which represents header fields.
+    # returns a Hash that represents header fields.
     # The Hash keys are downcased for canonicalization.
     attr_reader :meta
 
@@ -443,7 +443,7 @@
       meta_setup_encoding if name == 'content-type'
     end
 
-    # returns a Time which represents Last-Modified field.
+    # returns a Time that represents the Last-Modified field.
     def last_modified
       if v = @meta['last-modified']
         Time.httpdate(v)
@@ -537,11 +537,10 @@
     #
     # `options' must be a hash.
     #
-    # Each pairs which key is a string in the hash specify a extra header
-    # field for HTTP.
-    # I.e. it is ignored for FTP without HTTP proxy.
+    # Each option pair with a string key specifies an extra header field for
+    # HTTP.  I.e., it is ignored for FTP without HTTP proxy.
     #
-    # The hash may include other options which key is a symbol:
+    # The hash may include other options, where keys are symbols:
     #
     # [:proxy]
     #  Synopsis:
@@ -590,14 +589,13 @@
     #
     #  If :content_length_proc option is specified, the option value procedure
     #  is called before actual transfer is started.
-    #  It takes one argument which is expected content length in bytes.
+    #  It takes one argument, which is expected content length in bytes.
     #
     #  If two or more transfer is done by HTTP redirection, the procedure
     #  is called only one for a last transfer.
     #
     #  When expected content length is unknown, the procedure is called with
-    #  nil.
-    #  It is happen when HTTP response has no Content-Length header.
+    #  nil.  This happens when the HTTP response has no Content-Length header.
     #
     # [:progress_proc]
     #  Synopsis:
@@ -646,7 +644,7 @@
     #
     #  :ssl_verify_mode is used to specify openssl verify mode.
     #
-    # OpenURI::OpenRead#open returns an IO like object if block is not given.
+    # OpenURI::OpenRead#open returns an IO-like object if block is not given.
     # Otherwise it yields the IO object and return the value of the block.
     # The IO object is extended with OpenURI::Meta.
     #
@@ -662,10 +660,10 @@
     #  Synopsis:
     #    :redirect=>bool
     #
-    # :redirect=>false is used to disable HTTP redirects at all.
+    # :redirect=>false is used to disable all HTTP redirects.
     # OpenURI::HTTPRedirect exception raised on redirection.
     # It is true by default.
-    # The true means redirections between http and ftp is permitted.
+    # The true means redirections between http and ftp are permitted.
     #
     def open(*rest, &block)
       OpenURI.open_uri(self, *rest, &block)
Index: lib/tempfile.rb
===================================================================
--- lib/tempfile.rb	(revision 33085)
+++ lib/tempfile.rb	(revision 33086)
@@ -39,7 +39,7 @@
 # that's it's unnecessary to explicitly delete a Tempfile after use, though
 # it's good practice to do so: not explicitly deleting unused Tempfiles can
 # potentially leave behind large amounts of tempfiles on the filesystem
-# until they're garbage collected. The existance of these temp files can make
+# until they're garbage collected. The existence of these temp files can make
 # it harder to determine a new Tempfile filename.
 #
 # Therefore, one should always call #unlink or close in an ensure block, like
Index: lib/mathn.rb
===================================================================
--- lib/mathn.rb	(revision 33085)
+++ lib/mathn.rb	(revision 33086)
@@ -28,7 +28,7 @@
 #   20 / 9 * 3 * 14 / 7 * 3 / 2 # => 20
 #
 #
-# When you require 'mathn' the libraries for Prime, CMath, Matrix and Vector
+# When you require 'mathn', the libraries for Prime, CMath, Matrix and Vector
 # are also loaded.
 #
 # == Copyright
@@ -53,8 +53,8 @@
 end
 
 ##
-# When mathn is required Fixnum's division and exponentiation are enhanced to
-# return more precise values in mathematical formulas.
+# When mathn is required, Fixnum's division and exponentiation are enhanced to
+# return more precise values from mathematical expressions.
 #
 #   2/3*3  # => 0
 #   require 'mathn'
@@ -87,7 +87,7 @@
 
 ##
 # When mathn is required Bignum's division and exponentiation are enhanced to
-# return more precise values in mathematical formulas.
+# return more precise values from mathematical expressions.
 
 class Bignum
   remove_method :/
@@ -115,7 +115,7 @@
 end
 
 ##
-# When mathn is required Rational changes to simplfy the usage of Rational
+# When mathn is required Rational is changed to simplify the use of Rational
 # operations.
 #
 # Normal behaviour:
@@ -198,14 +198,14 @@
 end
 
 ##
-# When mathn is requried the Math module changes as follows:
+# When mathn is required, the Math module changes as follows:
 #
 # Standard Math module behaviour:
 #   Math.sqrt(4/9)     # => 0.0
 #   Math.sqrt(4.0/9.0) # => 0.666666666666667
 #   Math.sqrt(- 4/9)   # => Errno::EDOM: Numerical argument out of domain - sqrt
 #
-# After require 'mathn' this is changed to:
+# After require 'mathn', this is changed to:
 #
 #   require 'mathn'
 #   Math.sqrt(4/9)      # => 2/3
@@ -305,7 +305,7 @@
 end
 
 ##
-# When mathn is required Float is changed to handle Complex numbers.
+# When mathn is required, Float is changed to handle Complex numbers.
 
 class Float
   alias power! **
Index: lib/ostruct.rb
===================================================================
--- lib/ostruct.rb	(revision 33085)
+++ lib/ostruct.rb	(revision 33086)
@@ -11,7 +11,7 @@
 #
 # An OpenStruct is a data structure, similar to a Hash, that allows the
 # definition of arbitrary attributes with their accompanying values. This is
-# accomplished by using Ruby's metaporgramming to define methods on the class
+# accomplished by using Ruby's metaprogramming to define methods on the class
 # itself.
 #
 # == Examples:
@@ -72,8 +72,8 @@
 # method_missing and define_method.
 #
 # This should be a consideration if there is a concern about the performance of
-# the objects that are created. As there is much more overhead in the setting
-# of these properties compard to utilizing a Hash or a Struct.
+# the objects that are created, as there is much more overhead in the setting
+# of these properties compared to using a Hash or a Struct.
 #
 class OpenStruct
   #
Index: lib/thread.rb
===================================================================
--- lib/thread.rb	(revision 33085)
+++ lib/thread.rb	(revision 33086)
@@ -94,7 +94,7 @@
   # Wakes up all threads waiting for this lock.
   #
   def broadcast
-    # TODO: imcomplete
+    # TODO: incomplete
     waiters0 = nil
     @waiters_mutex.synchronize do
       waiters0 = @waiters.dup
@@ -144,7 +144,7 @@
   def initialize
     @que = []
     @waiting = []
-    @que.taint          # enable tainted comunication
+    @que.taint          # enable tainted communication
     @waiting.taint
     self.taint
     @mutex = Mutex.new
Index: lib/net/http.rb
===================================================================
--- lib/net/http.rb	(revision 33085)
+++ lib/net/http.rb	(revision 33086)
@@ -308,7 +308,7 @@
   # Here is HTTP response class hierarchy.  All classes are defined in Net
   # module and are subclasses of Net::HTTPResponse.
   #
-  # HTTPUnknownResponse:: For unhandled HTTP extenensions
+  # HTTPUnknownResponse:: For unhandled HTTP extensions
   # HTTPInformation::                    1xx
   #   HTTPContinue::                        100
   #   HTTPSwitchProtocol::                  101
@@ -514,7 +514,7 @@
     # Creates a new Net::HTTP object, then additionally opens the TCP
     # connection and HTTP session.
     #
-    # Argments are following:
+    # Arguments are the following:
     # _address_ :: hostname or IP address of the server
     # _port_    :: port of the server
     # _p_addr_  :: address of proxy
Index: ext/pty/lib/expect.rb
===================================================================
--- ext/pty/lib/expect.rb	(revision 33085)
+++ ext/pty/lib/expect.rb	(revision 33086)
@@ -1,12 +1,14 @@
 $expect_verbose = false
 
 class IO
-  # Reads ios until pattern matches or the timeout is over. It returns
-  # an array with the read buffer, followed by the matches. If a block is given,
-  # the result is yielded to the block and returns nil. The optional timeout parameter defines,
-  # in seconds, the total time to wait for pattern. If it is over of eof is found, it
-  # returns/yields nil. However, the buffer in a timeout session is kept for the next expect call.
-  # The default timeout is 9999999 seconds.
+  # Reads from the IO until pattern +pat+ matches or the +timeout+ is over.
+  # It returns an array with the read buffer, followed by the matches.
+  # If a block is given, the result is yielded to the block and returns nil.
+  #
+  # The optional timeout parameter defines, in seconds, the total time to wait
+  # for the pattern.  If the timeout expires or eof is found, nil is returned
+  # or yielded.  However, the buffer in a timeout session is kept for the next
+  # expect call.  The default timeout is 9999999 seconds.
   def expect(pat,timeout=9999999)
     buf = ''
     case pat
Index: ext/pathname/lib/pathname.rb
===================================================================
--- ext/pathname/lib/pathname.rb	(revision 33085)
+++ ext/pathname/lib/pathname.rb	(revision 33086)
@@ -386,7 +386,7 @@
   #   pn.children(false)
   #       # -> [ Pathname:English.rb, Pathname:Env.rb, Pathname:abbrev.rb, ... ]
   #
-  # Note that the result never contain the entries <tt>.</tt> and <tt>..</tt> in
+  # Note that the results never contain the entries <tt>.</tt> and <tt>..</tt> in
   # the directory because they are not children.
   #
   # This method has existed since 1.8.1.
@@ -490,7 +490,7 @@
   # manner.  It yields a Pathname for each file under "this" directory.
   #
   # Since it is implemented by <tt>find.rb</tt>, <tt>Find.prune</tt> can be used
-  # to control the traverse.
+  # to control the traversal.
   #
   # If +self+ is <tt>.</tt>, yielded pathnames begin with a filename in the
   # current directory, not <tt>./</tt>.

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

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