aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-06-29 23:15:13 -0500
committerJack Nagel2014-06-29 23:18:09 -0500
commitd083efdbdacf089dc779d4afe38bcedcdb6028db (patch)
tree378127587b0518a06ede3701459d16cebc25d127 /Library
parentac687d3b5f3654d8eaea8d4b8fc86905ef0a9f36 (diff)
downloadbrew-d083efdbdacf089dc779d4afe38bcedcdb6028db.tar.bz2
Don't mutate the tab object
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/tab.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/tab.rb b/Library/Homebrew/tab.rb
index 36ec55227..52b74e5c9 100644
--- a/Library/Homebrew/tab.rb
+++ b/Library/Homebrew/tab.rb
@@ -31,9 +31,9 @@ class Tab < OpenStruct
end
def self.from_file path
- tab = Tab.new Utils::JSON.load(File.read(path))
- tab.tabfile = path
- tab
+ attributes = Utils::JSON.load(File.read(path))
+ attributes[:tabfile] = path
+ new(attributes)
end
def self.for_keg keg