N
Nicko
Hi,
I have two arrays of hashes, and I'd like to subtract them to find the
difference elements between them eg.
-----------
array1 = Array.new
array2 = Array.new
tmp = {:name => "fred",
hone => "545334"}
array1.push(tmp)
tmp2 = tmp1.dup
array2.push(tmp2)
tmp3 = {:name => "stan",
hone => "hehe"}
array1.push(tmp3)
arraydiff = array1 - array2
--------------
What methods would I have to overload to accomplish this task? I
could not find an example like this anywhere!
Nicko
I have two arrays of hashes, and I'd like to subtract them to find the
difference elements between them eg.
-----------
array1 = Array.new
array2 = Array.new
tmp = {:name => "fred",
array1.push(tmp)
tmp2 = tmp1.dup
array2.push(tmp2)
tmp3 = {:name => "stan",
array1.push(tmp3)
arraydiff = array1 - array2
--------------
What methods would I have to overload to accomplish this task? I
could not find an example like this anywhere!
Nicko