From: Simon Strandgaard <0bz63fz3m1qt3001@...> Date: 2003-06-28T00:48:31+09:00 Subject: Re: Using & for arrays of objects On Fri, 27 Jun 2003 18:07:39 +0200, Robert Klemme wrote: > > No, I'm sorry, but I think in this case you're just plain wrong. :-) I > don't think the class needs a method & because array intersection > (Array#&) is defined as returning a single array that contains only > elements in self and the argument array. Thus elements need only be > comparable or similar. OK.. I wasn't aware that Ruby does the job for you (for free) :-) I was thinking: The intersection between two Trivial instances should not return an array.. instead it should return an instance of Trivial containing the result array... like this: def &(anOther) Trivial.new(@n & anOther.n) end -- Simon Strandgaard