I have an array like:
a = Array.new([1,2,3,4,5,5,6,6,7,8])
By doing the following, I expect the output to be the zeroth index, which is popped out of the array.
a.pop
a.pop(0)
I am getting the output nil
. Please give some suggestions on this behaviour.