A Ruby solution to Exercism.io's "nth prime" challenge