module Rake::TaskManager

def find_location

Find the location that called into the dsl layer.
def find_location
  locations = caller
  i = 0
  while locations[i]
    return locations[i + 1] if locations[i] =~ /rake\/dsl_definition.rb/
    i += 1
  end
  nil
end