From: Jim Weirich Date: 2004-08-24T22:05:46+09:00 Subject: Re: Rake FileList not working? T. Onoma wrote: > In my Rakefile (given in earlier post): > > PKG_FILES = FileList[ > "lib/**/*", > "test/**/*", > "examples/**/*", > "doc/**/*", > "[A-Z]*", > "install.rb", > "Rakefile" > ].exclude(/\bCVS\b|~$/) > p PKG_FILES.class > > # => NilClass > > Huh? (1) Remove the exclude call. You don't need it. FileLists are smart enough to automatically exclude CVS directories and backup files. (2) If you do need exclude, put it in a separate step. E.g. PKG_FILES = FileList['blah*.rb'] PKG_FILES.exclude(/.*test.rb/) Exclude must not be returning the filelist. That is a bug. I'll fix it in the next release. Thanks for the heads up. -- -- Jim Weirich jim@weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)