Replace direct comparison with Range#cover?