Ruby Solution for Project Euler #2