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

ruby-changes:20069

From: drbrain <ko1@a...>
Date: Thu, 16 Jun 2011 14:24:37 +0900 (JST)
Subject: [ruby-changes:20069] drbrain:r32116 (trunk): * lib/timeout.rb: Clarify timeout duration types. Patch by Alf Mikula.

drbrain	2011-06-16 14:24:12 +0900 (Thu, 16 Jun 2011)

  New Revision: 32116

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

  Log:
    * lib/timeout.rb: Clarify timeout duration types.  Patch by Alf Mikula.
      [Ruby 1.9 - Bug #4791]
    * lib/net/http.rb: ditto

  Modified files:
    trunk/ChangeLog
    trunk/lib/net/http.rb
    trunk/lib/timeout.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 32115)
+++ ChangeLog	(revision 32116)
@@ -1,3 +1,9 @@
+Thu Jun 16 14:15:47 2011  Eric Hodel  <drbrain@s...>
+
+	* lib/timeout.rb: Clarify timeout duration types.  Patch by Alf Mikula.
+	  [Ruby 1.9 - Bug #4791]
+	* lib/net/http.rb: ditto
+
 Thu Jun 16 13:25:25 2011  Eric Hodel  <drbrain@s...>
 
 	* lib/rdoc*:  Import RDoc 3.7 release candidate
Index: lib/timeout.rb
===================================================================
--- lib/timeout.rb	(revision 32115)
+++ lib/timeout.rb	(revision 32116)
@@ -36,7 +36,8 @@
   # Perform an operation in a block, timing it out if it takes longer
   # than +sec+ seconds to complete.
   #
-  # +sec+:: number of seconds to wait for the block to terminate
+  # +sec+:: Number of seconds to wait for the block to terminate. Any number
+  #         may be used, including Floats to specify fractional seconds.
   # +klass+:: Exception Class to raise if the block fails to terminate
   #           in +sec+ seconds.  Omitting will use the default, Timeout::Error
   #
Index: lib/net/http.rb
===================================================================
--- lib/net/http.rb	(revision 32115)
+++ lib/net/http.rb	(revision 32116)
@@ -619,13 +619,15 @@
     # The port number to connect to.
     attr_reader :port
 
-    # Number of seconds to wait for the connection to open.
-    # If the HTTP object cannot open a connection in this many seconds,
-    # it raises a TimeoutError exception.
+    # Number of seconds to wait for the connection to open. Any number
+    # may be used, including Floats for fractional seconds. If the HTTP
+    # object cannot open a connection in this many seconds, it raises a
+    # TimeoutError exception.
     attr_accessor :open_timeout
 
     # Number of seconds to wait for one block to be read (via one read(2)
-    # call). If the HTTP object cannot read data in this many seconds,
+    # call). Any number may be used, including Floats for fractional
+    # seconds. If the HTTP object cannot read data in this many seconds,
     # it raises a TimeoutError exception.
     attr_reader :read_timeout
 

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

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