Vector

Resize should check for negative index and throw the RangeError. Note that this makes pop on the empty vector throw error too.