From cff2f2c57805f19157b0626111a889f4bf3f55f7 Mon Sep 17 00:00:00 2001 From: Claudio Bley Date: Thu, 30 Sep 2021 17:17:23 +0200 Subject: [PATCH] rubocop => Security/IoMethods: File.write is safer than IO.write --- Rakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index a1db1b5..27b4947 100644 --- a/Rakefile +++ b/Rakefile @@ -25,7 +25,7 @@ file 'man/colorls.1' => ['man/colorls.1.ronn', 'lib/colorls/flags.rb'] do organization: "colorls #{ColorLS::VERSION}" } doc = Ronn::Document.new(nil, attributes) do - template = IO.read('man/colorls.1.ronn') + template = File.read('man/colorls.1.ronn') section = '' flags.options.each do |o| @@ -37,7 +37,7 @@ OPTION end template.sub('{{ OPTIONS }}', section) end - IO.write('man/colorls.1', doc.convert('roff')) + File.write('man/colorls.1', doc.convert('roff')) end desc 'Build the Zsh completion file'