Commit df204f8b authored by Kyle Fuller's avatar Kyle Fuller

Ensure file descriptors are closed

parent 7c8e0ceb
......@@ -207,7 +207,7 @@ module Pod
get_path_of_spec(@spec)
end
UI.puts File.open(filepath).read
UI.puts File.read(filepath)
end
end
......
......@@ -186,8 +186,8 @@ end
# The file in the temporary directory after running the pod command.
#
def yaml_should_match(expected, produced)
expected_yaml = YAML::load(File.open(expected))
produced_yaml = YAML::load(File.open(produced))
expected_yaml = File.open(expected) { |f| YAML.load(f) }
produced_yaml = File.open(produced) { |f| YAML.load(f) }
# Remove CocoaPods version
expected_yaml.delete('COCOAPODS')
produced_yaml.delete('COCOAPODS')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment