From a652474dbc66be350055db3e8f9b3a7b3fd75926 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Tue, 6 Aug 2019 13:18:15 -0400 Subject: [PATCH] prefer File.open to Kernel.open as prescribed by Rubocop's security checks --- lib/rexical/generator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rexical/generator.rb b/lib/rexical/generator.rb index cdfb46c..46752f0 100644 --- a/lib/rexical/generator.rb +++ b/lib/rexical/generator.rb @@ -314,7 +314,7 @@ def scan_str(str) def load_file( filename ) @filename = filename - open(filename, "r") do |f| + File.open(filename, "r") do |f| scan_setup(f.read) end end