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