versions: pass string to factory

Closes Homebrew/homebrew#20951.
This commit is contained in:
Adam Vandenberg 2013-07-01 16:45:27 -07:00
parent e3f26a9ced
commit 472b6e4fe1

View File

@ -88,7 +88,7 @@ class Formula
# Unload the class so Formula#version returns the correct value # Unload the class so Formula#version returns the correct value
begin begin
Formulary.unload_formula name Formulary.unload_formula name
nostdout { Formula.factory(path).version } nostdout { Formula.factory(path.to_s).version }
rescue *IGNORED_EXCEPTIONS => e rescue *IGNORED_EXCEPTIONS => e
# We rescue these so that we can skip bad versions and # We rescue these so that we can skip bad versions and
# continue walking the history # continue walking the history