On Sat, 8 May 2004 22:00:08 +0900, Jim Freeze <jim / freeze.org> wrote: > > On Tuesday, 4 May 2004 at 20:18:22 +0900, Chad Fowler wrote: > > > > >I thought mkdir_p checks to make sure of the existance of a dir before > > >creating it, and quietly fails if it already exists, making the > > >additional check seem odd. Is there a particular reason for this? > > > > > > unless File.exist? File.join(install_dir, "specifications") > > > FileUtils.mkdir_p File.join(install_dir, "specifications") > > > end > > > unless File.exist? File.join(install_dir, "cache") > > > FileUtils.mkdir_p File.join(install_dir, "cache") > > > end > > > > > You're right, but if we replaced this with: > > > > FileUtils.mkdir_p File.join(install_dir, "specifications") > > FileUtils.mkdir_p File.join(install_dir, "cache") > > > > ...it would run between 300 and 400 times slower (literally). That's > > not a big deal for a single require_gem, but in a system that loads a > > *lot* of gems, it might be a problem. > > > > So, what about submitting a patch to FileUtils to do this for us > and speed itself up? > Maybe not a bad idea. Go for it. :) Chad