From: Pete Elmore Date: 2005-08-02T05:18:47+09:00 Subject: Re: array in array, like include? Ben wrote: > a = [1,2,3,4,5] > b = [1,4] > > a.include?(b) will only work if b is a string. I'd like to get a > true/false if b exists in a. The to_set solution is probably better, but you could do something like class Array def subset(s) !s.find { |el| !self.include? el } end end irb(main):018:0> [1, 2, 3, 4].subset([1, 2]) => true irb(main):019:0> [1, 2, 3, 4].subset([1, :seventy_five]) => false