updating sleep to allow nil arguments

unstable
Adam Dalton 2012-09-11 11:20:03 -04:00
parent b0ce2c0003
commit 0b0af0a4f5
2 changed files with 2 additions and 2 deletions

View File

@ -91,7 +91,7 @@ require 'rex/platforms'
# Overload the Kernel.sleep() function to be thread-safe
Kernel.class_eval("
def sleep(seconds)
def sleep(seconds=nil)
Rex::ThreadSafe.sleep(seconds)
end
")

View File

@ -72,7 +72,7 @@ module ThreadSafe
# Simulates a sleep operation by selecting on nil until a timeout period
# expires.
#
def self.sleep(seconds)
def self.sleep(seconds=nil)
self.select(nil, nil, nil, seconds)
seconds