global
def each_ancestor(include_self: false, &block)
def each_ancestor(include_self: false, &block) unless block_given? return to_enum(__method__, include_self: include_self) end yield self if include_self scan_ancestors(&block) self end
def each_ancestor(include_self: false, &block) unless block_given? return to_enum(__method__, include_self: include_self) end yield self if include_self scan_ancestors(&block) self end