In the irb prompt:
array = [1,2,3,4,5]
array << 0
array.sort
[0,1,2,3,4,5]
I fully understand the above, but when I do this:
array.delete_at(2)
it deletes 3 in the array. If the first is considered 1, why the number 3 was removed instead of number 1?
sort!rather thansort.