More exercises from the Ruby chapter