ruby prime factors