about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/yahns/config.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/yahns/config.rb b/lib/yahns/config.rb
index 88af2de..c923434 100644
--- a/lib/yahns/config.rb
+++ b/lib/yahns/config.rb
@@ -278,7 +278,8 @@ class Yahns::Config # :nodoc:
     var = _check_in_block(nil, :client_expire_threshold)
     case val
     when Float
-      val <= 1.0 or raise ArgumentError, "#{var} must be <= 1.0 if a ratio"
+      (val > 0 && val <= 1.0) or
+        raise ArgumentError, "#{var} must be > 0 and <= 1.0 if a ratio"
     when Integer
     else
       raise ArgumentError, "#{var} must be a float or integer"