Hamming exercise updated | More ruby-ish solution.