Last crystal update - Dir.glob

Hi everyone, I have a question. Before my project was using this implementation:

def deleteAllHiddenFiles(path : String)
            begin
                Dir.glob("#{path}/.*", match_hidden: true) do |file_path|
                    if File.file?(file_path)
                        deleteFile(file_path)
                    end
                end
            rescue error
                Ism.notifyOfDeleteAllHiddenFilesError(path, error)
                Ism.exitProgram
            end
        end

The compiler outputted warning about deprecated use of the Dir.glob function. I tried to update to the last way to do, but I think I didn’t use properly, because crystal complain about undefined constant DotFiles:

Dir.glob(Dir["#{path}/.*"], File::MatchOptions::DotFiles)

Are you sure? What you have in your second snippet seems to work fine for me?

Sorry my bad. I realized the system generated by my software need first to update the crystal version.

Thanks anyway.