Removing files with varied capitalization

Nothing ground-breaking today, just a one-liner that I expected to be longer than a one-liner.

# Remove Rakefile, rakefile, RakeFile, etc...
File.delete(*Dir.glob('rakefile', File::FNM_CASEFOLD))

There are two notable things going on here:

  1. Dir.glob can take optional bitflags; in this case, FNM_CASEFOLD means to ignore case.
  2. File.delete can take N arguments.