From: nobu.nokada@... Date: 2004-06-19T20:09:59+09:00 Subject: Re: Problems with FileUtils in Rake Hi, At Sat, 19 Jun 2004 19:03:20 +0900, Charles Comstock wrote in [ruby-talk:104118]: > >>task :examples do > >> rm_rf %{~/.ruby_inline} > > > > > > rm_rf File.expand_path(%{~/.ruby_inline}) > > > > FileUtils itself doesn't do tilde-expansion. > > > > Ah. Hmm. Is there a way to force it to do tilde expansion if the > functionality is available? The application won't work without posix > support anyway, so isn't this something we could assume? Or is that an > unfair assumption? What is the preferred way to deal with this? Which application do you mention about, Rake? Including this module may work, instead of FileUtils: module Tilde module_function def rm_rf(*args) args.collect!{|n|File.expand_path(n) rescue break} FileUtils.rm_rf(*args) end end -- Nobu Nakada