Problem 2 [Ruby]