Daniel Berger a ñÄrit : > Hi all, > > Windows XP > Ruby 1.8.2 > Rake 0.5.4 > > When I tried this simple rakefile it went into an infinite loop (and > leaks like a sieve). Experiments show that it seems to be happening in > the directory task. > > Am I doing something wrong? > > # rakefile > require "rbconfig" > require "rake/testtask" > include Config > > destdir = CONFIG["sitelibdir"] + "/html" > directory destdir # Inifinite loop here > > desc "Install html-table" > task :install do |t| > FileUtils["lib/html/*.rb"].each{ |file| > cp(file, destdir) > } > end > > Regards, > > Dan > It's a bug. When constructing your destdir, you obtain something like this: c:/usr/ruby/lib/ruby/site_ruby/1.8/html (this what I obtain on my computer) But in rake.rb, on line 408, the code for directory is as this: ----8<---- def directory(dir) while dir != '.' && dir != '/' # work on unix but not on windows file dir do |t| mkdir_p t.name if ! File.exist?(t.name) end dir = File.dirname(dir) end end ----8<---- I hope this will help -- Lionel Thiry Personal website: http://users.skynet.be/lthiry/