What is the logic behind below results:
a = []
a[0..2] # => []
a[1..2] # => nil
I would expect the last example to also return empty array, why is it different?
What is the logic behind below results:
a = []
a[0..2] # => []
a[1..2] # => nil
I would expect the last example to also return empty array, why is it different?