Sixth exercise of ruby