diff options
| author | Jack Nagel | 2014-06-29 23:15:13 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-06-29 23:18:09 -0500 |
| commit | 528dad0ea8a12afa4b01550948240cf714f65a29 (patch) | |
| tree | 03e8a59f9b77cc6537c62b1bb8ef571bd7cff287 /Library/Homebrew/tab.rb | |
| parent | af66b6134e71e5ef0fa3cfb507b2c741083dc954 (diff) | |
| download | homebrew-528dad0ea8a12afa4b01550948240cf714f65a29.tar.bz2 | |
Don't mutate the tab object
Diffstat (limited to 'Library/Homebrew/tab.rb')
| -rw-r--r-- | Library/Homebrew/tab.rb | 6 |
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 |
