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>
This commit is contained in:
parent
f3f04e595d
commit
5bfd8faf90
@ -62,6 +62,8 @@ class Formula
|
|||||||
mktemp do
|
mktemp do
|
||||||
path = Pathname.new(Pathname.pwd+"#{name}.rb")
|
path = Pathname.new(Pathname.pwd+"#{name}.rb")
|
||||||
path.write text_from_sha(sha)
|
path.write text_from_sha(sha)
|
||||||
|
# FIXME: shouldn't have to do this?
|
||||||
|
Object.send(:remove_const, "#{name.capitalize}")
|
||||||
Formula.factory(path).version
|
Formula.factory(path).version
|
||||||
end rescue nil
|
end rescue nil
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user