A simple Ruby exercise