From a8fe03f72bc2454b5cccca4f751da21e09c350c6 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Wed, 23 Oct 2013 23:22:28 -0500 Subject: Tab: ensure file is closed after reading --- Library/Homebrew/tab.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Library') diff --git a/Library/Homebrew/tab.rb b/Library/Homebrew/tab.rb index 239820c5f..708e10346 100644 --- a/Library/Homebrew/tab.rb +++ b/Library/Homebrew/tab.rb @@ -29,7 +29,7 @@ class Tab < OpenStruct end def self.from_file path - tab = Tab.new Utils::JSON.load(open(path).read) + tab = Tab.new Utils::JSON.load(File.read(path)) tab.tabfile = path tab end -- cgit v1.2.3