Actions
Bug #1317
closedCreating a range with strings
Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 1.8.6 (2007-09-24 patchlevel 111) [i486-linux]
Backport:
Description
=begin
irb(main):027:0> Range.new("1", "10").to_a
=> ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]
irb(main):028:0> Range.new("2", "10").to_a
=> []
The second result happens when the end of the range is greater numerically but the first character of the start is higher than the first character of the end.
It seems like these two return values are inconsistent. If the range is able to work a list of entries between two integers as strings, it should do it regardless of their first character.
=end
Actions
Like0
Like0Like0Like0Like0