Notes posted by colmac
RSS feed![Default_avatar_30](https://www.gravatar.com/avatar/8f04cef0d283ae7fd67eb8a1cc641d7a?default=http://apidock.com/images/default_avatar_30.png&size=30)
0 thanks
Test if an array is included in another
a note for anoiaque solution…
before running you need to require set
require 'set' class Array def included_in? array array.to_set.superset(self.to_set) end end [1,2,4].included_in?([1,10,2,34,4]) #=> true