My homework for Ruby.