class Rake::InvocationChain

circular dependencies.
InvocationChain tracks the chain of task invocations to detect
###################################################################

def self.append(value, chain)

def self.append(value, chain)
  chain.append(value)
end

def append(value)

def append(value)
  if member?(value)
    fail RuntimeError, "Circular dependency detected: #{to_s} => #{value}"
  end
  self.class.new(value, self)
end

def initialize(value, tail)

def initialize(value, tail)
  @value = value
  @tail = tail
end

def member?(obj)

def member?(obj)
  @value == obj || @tail.member?(obj)
end

def prefix

def prefix
  "#{@tail.to_s} => "
end

def to_s

def to_s
  "#{prefix}#{@value}"
end