diff options
| author | Jack Nagel | 2012-01-06 22:00:38 -0600 |
|---|---|---|
| committer | Jack Nagel | 2012-01-06 22:07:45 -0600 |
| commit | 483d41c7efbc3fa6281de3f983627e6751f6b6fa (patch) | |
| tree | 603a32f4e05084b835f69e46d2d5faecdc68b952 /Library | |
| parent | 477a4453ded59a4b85da24737fd45dd88d092663 (diff) | |
| download | homebrew-483d41c7efbc3fa6281de3f983627e6751f6b6fa.tar.bz2 | |
versions: unload old class before obtaining version
This is silly, but I am no Rubyist and I don't have time to
figure out why Formula.factory(foo).url works as expected but
Formula.factory(foo).version does not.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/versions.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/versions.rb b/Library/Homebrew/cmd/versions.rb index 906fc4f8c..696282545 100644 --- a/Library/Homebrew/cmd/versions.rb +++ b/Library/Homebrew/cmd/versions.rb @@ -62,6 +62,8 @@ class Formula mktemp do path = Pathname.new(Pathname.pwd+"#{name}.rb") path.write text_from_sha(sha) + # FIXME: shouldn't have to do this? + Object.send(:remove_const, "#{name.capitalize}") Formula.factory(path).version end rescue nil end |
