# File lib/sass/selector/simple_sequence.rb, line 66 def do_extend(extends, parent_directives, seen = Set.new) extends.get(members.to_set).map do |ex, sels| # If A {@extend B} and C {...}, # ex.extender is A, sels is B, and self is C self_without_sel = self.members - sels next unless unified = ex.extender.members.last.unify(self_without_sel) next unless check_directives_match!(ex, parent_directives) [sels, ex.extender.members[0...-1] + [unified]] end.compact.map do |sels, seq| seq = Sequence.new(seq) next [] if seen.include?(sels) seq.do_extend(extends, parent_directives, seen + [sels]) end.flatten.uniq end