aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2013-10-23 23:22:28 -0500
committerJack Nagel2013-10-23 23:24:42 -0500
commit070255da2da512b96d5adadfa04da57e4cfe82b4 (patch)
tree6117640674015433b614a4d16c808a3e650c0033
parent57efdbcf699fdc34ae3d4ecea6278a42f8d9dbe2 (diff)
downloadhomebrew-070255da2da512b96d5adadfa04da57e4cfe82b4.tar.bz2
Tab: ensure file is closed after reading
-rw-r--r--Library/Homebrew/tab.rb2
1 files changed, 1 insertions, 1 deletions
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