From d082510429c9b9f39656e5faf811f06677de1dd3 Mon Sep 17 00:00:00 2001 From: aycabta Date: Mon, 9 Aug 2021 21:03:27 +0900 Subject: [ruby/rdoc] Add "rake clean" task to erase generated parser files https://github.com/ruby/rdoc/commit/4e3e635afa --- lib/rdoc/Rakefile | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/rdoc') diff --git a/lib/rdoc/Rakefile b/lib/rdoc/Rakefile index fb00a270bc..278972e3ed 100644 --- a/lib/rdoc/Rakefile +++ b/lib/rdoc/Rakefile @@ -90,6 +90,12 @@ task "#{path}.gem" => package_parser_files desc "Generate all files used racc and kpeg" task :generate => parsed_files +task :clean do + parsed_files.each do |path| + File.delete(path) if File.exist?(path) + end +end + begin require 'rubocop/rake_task' rescue LoadError -- cgit v1.2.3