Actions
Bug #20487
closed1..nil is giving range from 1 to inifinity in ruby greater than 2.6
Description
we consider nil as undefined value, value that is not present, we consider nil as falsey value as well, when we do nil.to_i it gives us zero..then with this rational 1..nil shouldn't give the range 1 to infinity, either we should make it as invalid or it should be converted to 1..0
script:
(1..nil).each {|n| puts n }
output
1
2
3
4
5
6
7
.
.
.
.
infinity
Actions
Like0
Like0Like0