These ranges are not equal - consider the case when you call include?with a floating point:
(1 .. 2).include? 2.5
false
(1 ... 3).include? 2.5
true
They return to the same results if we compare them with integers, but this does not mean that they are identical.
source
share