fix Array#last

Hi.
I fixed `Array#last` method. Now it `raise Exception` when argument `string`, `nil` or not have `to_int` method.
Thanks.