A Ruby solution to Exercism.io's "Hamming" challenge