O'Reilly logo
  • Manh Giang thinks this is interesting:

removing elements that appear in both arrays

From

Cover of Learning Ruby

Note

This is wrong. With me = [1,2,3,4] her = [3,5,6], Ruby says (her -me) => [5,6] and (me - her) = [1,2,4]. I think x - y returns items in x and not in y.