From: "Saji N. Hameed" Date: 2008-05-28T22:47:15+09:00 Subject: Re: Merge collections of objects * John Butler [2008-05-28 21:55:51 +0900]: > Hi, > > I wonder if there is a quick way to do this. > > companyA has 2 employees "a", "b" > > companyB has 3 employees "a", "b", "c" > > I basically want to merge companyA employess with companyB employees so > when i look at companyA the employees will equal "a", "b", "c" [snip] Hi, Is this what you are looking for? #-------------------------- ayes = %w( john jani janardhan ) bees = %w( john ami samy jani) for b in bees ayes << b if ayes.index(b) == nil end puts ayes #-------------------------- saji -- Saji N. Hameed APEC Climate Center +82 51 668 7470 National Pension Corporation Busan Building 12F Yeonsan 2-dong, Yeonje-gu, BUSAN 611705 saji@apcc21.net KOREA