Improved ruby prime finder