Memory Intensive Ruby Script