Fourth exercise of ruby