module Guard

def _guardfile_deprecated_check(modified)

TODO: not tested because collides with ongoing refactoring
TODO: remove at some point
def _guardfile_deprecated_check(modified)
  modified.map!(&:to_s)
  regexp = %r{^(?:.+/)?Guardfile$}
  guardfiles = modified.select { |path| regexp.match(path) }
  return if guardfiles.empty?
  guardfile = Pathname("Guardfile").realpath
  real_guardfiles = guardfiles.detect do |path|
    /^Guardfile$/.match(path) || Pathname(path).expand_path == guardfile
  end
  return unless real_guardfiles
  UI.warning "Guardfile changed -- _guard-core will exit.\n"
  exit 2 # nonzero to break any while loop
end