Use File.read over IO.read

This commit is contained in:
Bo Anderson 2021-04-14 12:42:26 +01:00
parent 586d25a522
commit 1feed79e69
No known key found for this signature in database
GPG Key ID: 3DB94E204E137D65
2 changed files with 2 additions and 2 deletions

View File

@ -567,7 +567,7 @@ module Homebrew
def parse_json_files(filenames)
filenames.map do |filename|
JSON.parse(IO.read(filename))
JSON.parse(File.read(filename))
end
end

View File

@ -91,7 +91,7 @@ module Homebrew
odie "No bottle JSON files found in the current working directory" if json_files.empty?
bottles_hash = json_files.reduce({}) do |hash, json_file|
hash.deep_merge(JSON.parse(IO.read(json_file)))
hash.deep_merge(JSON.parse(File.read(json_file)))
end
if args.root_url