Completed ruby exercise 41.