From 6e1e3ea7401aa336e464e2b7cc844ecc3e94170f Mon Sep 17 00:00:00 2001 From: Thomas Walpole Date: Sun, 18 Nov 2018 12:52:39 -0800 Subject: [PATCH] use conditional modifier --- lib/capybara/result.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/capybara/result.rb b/lib/capybara/result.rb index 97ad96dc..0eea2891 100644 --- a/lib/capybara/result.rb +++ b/lib/capybara/result.rb @@ -94,7 +94,7 @@ module Capybara if between min, max = between.min, (between.end && between.max) size = load_up_to(max ? max + 1 : min) - return between.include?(size) ? 0 : size <=> min + return size <=> min unless between.include?(size) end 0