add problem 7 ruby solution.