Ruby 1.8.7 doesn't have Range#cover? and Range#include? is slow in 1.9.