From: Dave Thomas Date: 2001-07-13T06:35:04+09:00 Subject: [ruby-talk:17759] Re: What is Array#- ? Jim Freeze writes: > Regardless, if I have 5 apples and 2 pairs and I take away the pairs, > why do I end up with only 1 apple? Easy: 5 - 2 pairs is one. Next :) It's just that you can't have 5 apples in a set. They'd need to be in a bag. Somewhat confusingly, the opposite of Array#- is array#|, for set union. a = [ ] 5.times { a = a | [ :apple ] } 2.times { a = a | [ :pear ] } p a #=> [ :apple, :pear ] Regards Dave