Completed ruby exercise 30.