Fix #5127 - error when accessing array elements
Accesing an array with an integer index (ie $array[1]) is producing
a ruby error: can't convert String into Integer
This is because the array index is not properly converted to an number
before the array element lookup is performed.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>