------art_46059_15411966.1164252521122
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 11/23/06, stuart yarus <syarus / gmail.com> wrote:
>
>
> What's wrong with:
>
> irb(main):002:0> require 'set'
> true
> irb(main):003:0> t1  1,2,3,4,"abc"]
> [1, 2, 3, 4, "abc"]
> irb(main):004:0> t2  2,3,1,"abc",4]
> [2, 3, 1, "abc", 4]
> irb(main):005:0> s1  et.new(t1)
> #<Set: {"abc", 1, 2, 3, 4}>
> irb(main):006:0> s2  et.new(t2)
> #<Set: {"abc", 1, 2, 3, 4}>
> irb(main):007:0> s1 s2
> true
> irb(main):008:0> s1.subset?(s2)
> true
> irb(main):009:0> s2.subset?(s1)
> true


This would remove duplicates prior to the comparison.  I want to do the
comparison on the raw arrays since if there is duplicates in one and not the
other then they should not be equal.

------art_46059_15411966.1164252521122--