How does Ruby do Array comparision?
old_inventory = [ 'a', 'b', 'd' ] new_inventory = [ 'a','e', 'c' ] puts "The following files have been added: " puts new_inventory - old_inventory puts "" puts "The following files have been deleted: " puts old_inventory - new_inventory
Notice the output is correct so it’s not a case of element 0’s being
compared in each array.
Does Ruby sort arrays in memory first? or is a scan done 1 element at a