From d083efdbdacf089dc779d4afe38bcedcdb6028db Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 29 Jun 2014 23:15:13 -0500 Subject: Don't mutate the tab object --- Library/Homebrew/tab.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Library/Homebrew/tab.rb') 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 -- cgit v1.2.3