在Ruby中获取数组的区别

可能重复:
比较ruby串或数组

我有一个旧的数组: [1, 2, 3, 4, 5]和新的: [1, 2, 4, 6]

如何与Ruby区别:5,3被删除, 6被添加?

 irb(main):001:0> a = [1, 2, 3, 4, 5] => [1, 2, 3, 4, 5] irb(main):002:0> b = [1, 2, 4, 6] => [1, 2, 4, 6] irb(main):003:0> a - b => [3, 5] irb(main):005:0> b - a => [6] irb(main):006:0>