From: "Hal E. Fulton" Date: 2000-12-03T07:40:06+09:00 Subject: [ruby-talk:6754] Re: Array Intersect (&) question > 3) Finally, I believe there is a logic bug in the current intersect > functionality. I actually would expect that two arrays, both with the same > dup elements would yield that dup in the intersection: > > a2 = %w# 1 1 y # -> ["1", "1", "y"] > a3 = %w# 1 y 1 z # -> ["1", "y", "1", "z"] > a2 & a3 -> ["1", "y"] > > Whereas I believe the true intersection of a2 & a3 should be > ["1", "1", "y"] . Opinions? > Hmm, I can't agree with you on this one. The very term "intersect" suggests to me a mathematical set; a set intersection (in math) never results in duplicates because sets can't have duplicates. Just my 1.2 yen. Hal Fulton