From: Jamal Soueidan Date: 2011-01-15T07:39:21+09:00 Subject: Re: array dynamic intersection and union Hello Rob, Sorry I did not explain myself first time. But I let us say I have these hashes. rule = {:array => [1,2,3,4], :condition => "AND"} rule2 = {:array => [1,2,3,4], :condition => "OR"} rule3 = {:array => [3,4]} How can I intersection and union based on the conditions in the hash through them all? So it end up like this array = rule[:array] & rule2[:array] | rule3[:array] -- Posted via http://www.ruby-forum.com/.