From ad622a9e877d714b3c72ec12a3a7eda7f07eb045 Mon Sep 17 00:00:00 2001 From: Russell Teabeault Date: Thu, 21 Mar 2013 09:28:40 -0600 Subject: [PATCH] versions: unload constant before calling Formula.factory Closes Homebrew/homebrew#18634. Signed-off-by: Jack Nagel --- Library/Homebrew/cmd/versions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/versions.rb b/Library/Homebrew/cmd/versions.rb index 3d186bf72b..ae8c321ad9 100644 --- a/Library/Homebrew/cmd/versions.rb +++ b/Library/Homebrew/cmd/versions.rb @@ -68,8 +68,8 @@ class Formula # Unload the class so Formula#version returns the correct value begin - version = nostdout { Formula.factory(path).version } Object.send(:remove_const, Formula.class_s(name)) + version = nostdout { Formula.factory(path).version } version rescue SyntaxError, TypeError, NameError, ArgumentError # We rescue these so that we can skip bad versions and