Change line 9 to:

 @relationship[client] ||= []

-This is quite advanced syntax. It is saying, search through the @relationship hash using the client key, if it is nothing create a new client key with an empty array as its value. If the client already exits in the adoption hash, we do not want to overwrite its animals array by reassigning it to an empty array. Have a look at this article:
https://blogs.oracle.com/prashant/entry/the_ruby_t_square_operator