Skip to content

Commit

Permalink
* lib/timeout.rb: Clarify timeout duration types. Patch by Alf Mikula.
Browse files Browse the repository at this point in the history
	  [Ruby 1.9 - Bug #4791]
	* lib/net/http.rb: ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
drbrain committed Jun 16, 2011
1 parent b7528b5 commit dbf9bae
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
@@ -1,3 +1,9 @@
Thu Jun 16 14:15:47 2011 Eric Hodel <drbrain@segment7.net>

* 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@segment7.net>

* lib/rdoc*: Import RDoc 3.7 release candidate
Expand Down
10 changes: 6 additions & 4 deletions lib/net/http.rb
Expand Up @@ -619,13 +619,15 @@ def set_debug_output(output)
# 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

Expand Down
3 changes: 2 additions & 1 deletion lib/timeout.rb
Expand Up @@ -36,7 +36,8 @@ class ExitException < ::Exception # :nodoc:
# 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
#
Expand Down

0 comments on commit dbf9bae

Please sign in to comment.