I think you mixed up hash and array. An array is indexed by an integer. A hash is key value pairs, the key can be any object.