aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorJack Nagel2013-10-23 23:22:28 -0500
committerJack Nagel2013-10-23 23:24:42 -0500
commita8fe03f72bc2454b5cccca4f751da21e09c350c6 (patch)
tree4b90f4d245e628b2bedb334e525dc038e1a513a2 /Library/Homebrew
parent3716dae0ced97b9972f26dac297bafc7cbbded28 (diff)
downloadbrew-a8fe03f72bc2454b5cccca4f751da21e09c350c6.tar.bz2
Tab: ensure file is closed after reading
Diffstat (limited to 'Library/Homebrew')
-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