What I like about this solution is that it consists of just adding a few extensions to the Numeric class plus a simple line that almost repeats the problem given. Ruby does actually include a prime generator through the Prime object in the mathn library. But it seemed to perform worse that even my ultra-naive solution to generating the prime numbers.
The addition of sqrt to Numeric is obviously not necessary. We could just call Math.sqrt directly. But I think Math.sqrt is an ugly wart of Ruby and it should be Numeric.sqrt as I have implemented. Other may disagree but what is nice is that Ruby gives you the option to determine how to express the code.