Issue #1317 has been updated by Michael Selig.


This is a (possibly confusing) consequence of the behaviour of String#next.
For most sortable objects, the following is true:

obj.next > obj

but not for strings. For example:

"9".next => "10"
but
"10" > "9" => false

So if you think of a range as a potential "for" loop in a C-style syntax it would be:

for (obj = start; obj < end; obj = next(obj)) ....

then you will see that the loop will stop immediately when start is "2" and end is "10".

Obviously the behaviour of string comparison can't be changed.

Cheers
Mike.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/1317

----------------------------------------
http://redmine.ruby-lang.org