diff --git a/Library/Contributions/cmd/brew-unpack.rb b/Library/Contributions/cmd/brew-unpack.rb index b5023f1a25..4ff19b0e16 100755 --- a/Library/Contributions/cmd/brew-unpack.rb +++ b/Library/Contributions/cmd/brew-unpack.rb @@ -28,22 +28,13 @@ module UnpackPatch return unless ARGV.flag? "--patch" begin - # Silence complaints about re-setting constants. old_verbose = $VERBOSE $VERBOSE = nil - Formula.const_set "DATA", ScriptDataReader.load(path) + Object.const_set "DATA", ScriptDataReader.load(path) ensure $VERBOSE = old_verbose end - # Legacy patches are fixed by setting Formula::DATA. - # Now, handle instances of IOPatch. - patchlist.select{|p| p.is_a? IOPatch}.each do |patch| - if patch.instance_variable_get(:@io) == :DATA - patch.instance_variable_set :@io, ScriptDataReader.load(path) - end - end - super end end