Finished challenge 8 in Ruby.