diff options
| author | Jack Nagel | 2014-04-29 15:40:37 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-04-29 15:41:23 -0500 |
| commit | ebec0284c68b2c7093637971d49db4dca59af8a7 (patch) | |
| tree | 1ea28d7d66f369ca974cf202d8e097f8b863965b /Library | |
| parent | b18c201e6f6e1e4bfb75f2390892c6038fb4ac68 (diff) | |
| download | homebrew-ebec0284c68b2c7093637971d49db4dca59af8a7.tar.bz2 | |
unpack: use correct constant scope for DATA
Formula::DATA only worked by accident of implementation; DATA during the
build is actually Object::DATA, so we should mirror that here.
This reverts commit b12444ba6e1ac1d596a70ff4c777d9386d0791ac.
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/Contributions/cmd/brew-unpack.rb | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/Library/Contributions/cmd/brew-unpack.rb b/Library/Contributions/cmd/brew-unpack.rb index b5023f1a2..4ff19b0e1 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 |
