lib/soaspec/wait.rb in soaspec-0.2.29 vs lib/soaspec/wait.rb in soaspec-0.2.30
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
module Soaspec
class TimeOutError < StandardError; end
# Class to enable waiting for an expected condition to return true
class Wait
DEFAULT_TIMEOUT = 5
@@ -25,10 +27,10 @@
until Time.now > end_time
begin
result = yield
return result if result
- rescue *ignored => last_error
+ rescue *ignored => e
# swallowed
end
sleep interval
end