How to determine if one array contains all elements of another array October 15, 2022 by Tarik a = [5, 1, 6, 14, 2, 8] b = [2, 6, 15] a - b # => [5, 1, 14, 8] b - a # => [15] (b - a).empty? # => false