>>>>> "W" == Wolfgang NŠŇasi-Donner <wonado / donnerweb.de> writes:

>>>> Output >>>
W> 0 cats, 0 dogs, 0 animals
W> a new dog
W> a new dog
W> 2 cats, 2 dogs, 2 animals
W> a new cat
W> a new cat
W> a new cat
W> 5 cats, 5 dogs, 5 animals
>>>> End of Example >>>

 With this version of ruby

uln% ruby -v
ruby 1.9.0 (2005-03-14) [x86_64-linux]
uln% 

 The result is

0 cats, 0 dogs, 0 animals
a new dog
a new dog
0 cats, 2 dogs, 0 animals
a new cat
a new cat
a new cat
3 cats, 2 dogs, 0 animals


-- 

Guy Decoux