Fifth exercise of ruby