ruby-changes:27963
From: hsbt <ko1@a...>
Date: Sun, 31 Mar 2013 11:02:47 +0900 (JST)
Subject: [ruby-changes:27963] hsbt:r40015 (trunk): doumentation by @toolmantim [GH fixes #270]
hsbt 2013-03-31 11:01:17 +0900 (Sun, 31 Mar 2013) New Revision: 40015 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40015 Log: doumentation by @toolmantim [GH fixes #270] * timeout.rb: Document Timeout::timeout 0 and nil argument behavior Modified files: trunk/lib/timeout.rb Index: lib/timeout.rb =================================================================== --- lib/timeout.rb (revision 40014) +++ lib/timeout.rb (revision 40015) @@ -33,11 +33,12 @@ module Timeout https://github.com/ruby/ruby/blob/trunk/lib/timeout.rb#L33 CALLER_OFFSET = ((c = caller[0]) && THIS_FILE =~ c) ? 1 : 0 # :startdoc: - # Perform an operation in a block, timing it out if it takes longer - # than +sec+ seconds to complete. + # Perform an operation in a block, raising an error if it takes longer than + # +sec+ seconds to complete. # # +sec+:: Number of seconds to wait for the block to terminate. Any number - # may be used, including Floats to specify fractional seconds. + # may be used, including Floats to specify fractional seconds. A + # value of 0 or +nil+ will execute the block without any timeout. # +klass+:: Exception Class to raise if the block fails to terminate # in +sec+ seconds. Omitting will use the default, Timeout::Error # -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/