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.
Instances of `IOPatch` created by `patch :DATA` are not affected by re-setting
the `DATA` constant of the `Formula` instance. For these patches, we iterate
through the `patchlist` and use `instance_variable_set` to attach data.
A bit hacky, but `patchlist` has no write accessors so there isn't a clean way
to modify patch contents.
If we want to generate usable patches from inside the unpacked source,
then we should start from the same directory that a normal install
would start from.
Array#one? wasn't yet defined in Ruby 1.8.6. In this case the block form
isn't being used, so Array.length == 1 is a simple replacement.
Fixesmistydemeo/tigerbrew#123.