lib/darkholme/bitset.rb in darkholme-1.0.0 vs lib/darkholme/bitset.rb in darkholme-1.0.1
- old
+ new
@@ -61,10 +61,10 @@
#
# @param other [Bitset] Bitset use for inclusion check
#
# @return [Boolean] Whether or not all bits are flipped in both
def include?(other)
- set_indexes & other.set_indexes == other.set_indexes
+ set_indexes.sort & other.set_indexes.sort == other.set_indexes.sort
end
# Perform a bitwise AND
#
# @param other [Bitset or Fixnum] Other object to use for AND