Re:Reading the Ruby Source to Understand Rails Idiosyncrasies
by norswap on Saturday July 20, 2013 @05:18PM
(#6076615)
Ranges are always continuous, but `cover?` uses the comparison operators, while `include?` iterates over the items in the range in some cases. `include?` is practical in cases where you don't want to implement the comparison operators.
I can't think of a Range that is not meant to be continuous...I would test out some cases right now if my computer weren't grinding away at a database insertion process...
edit: OK, tried it out....as I suspected, Ranges that consists of Strings will have different behavior: