hamming on ruby iteration 5