Merge pull request #11138 from Bo98/io-read

Use File.read over IO.read
This commit is contained in:
Mike McQuaid 2021-04-14 13:30:50 +01:00 committed by GitHub
commit b153620f63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -567,7 +567,7 @@ module Homebrew
def parse_json_files(filenames) def parse_json_files(filenames)
filenames.map do |filename| filenames.map do |filename|
JSON.parse(IO.read(filename)) JSON.parse(File.read(filename))
end end
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? odie "No bottle JSON files found in the current working directory" if json_files.empty?
bottles_hash = json_files.reduce({}) do |hash, json_file| 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 end
if args.root_url if args.root_url