Replace direct comparison with Range#cover

It seems more idiomatic to me to use Range#cover?