bottle: fix Ruby 1.8 breakage

`OpenStruct` (of which `Tab` is a subclass) doesn't support subscripting
with square brackets. Use normal dot notation to restore compatibility.
This commit is contained in:
Martin Afanasjew 2015-12-16 02:12:50 +01:00
parent b0e39203fe
commit 02cd2c899a

View File

@ -203,9 +203,9 @@ module Homebrew
tab = Tab.for_keg(keg) tab = Tab.for_keg(keg)
original_tab = tab.dup original_tab = tab.dup
tab["poured_from_bottle"] = false tab.poured_from_bottle = false
tab["HEAD"] = nil tab.HEAD = nil
tab["time"] = nil tab.time = nil
tab.write tab.write
keg.find {|k| File.utime(File.atime(k), formula_source_time, k) } keg.find {|k| File.utime(File.atime(k), formula_source_time, k) }