Cyrus Innovation's code test (Ruby)