aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/versions.rb
diff options
context:
space:
mode:
authorRussell Teabeault2013-03-21 09:28:40 -0600
committerJack Nagel2013-03-21 13:26:56 -0500
commitad622a9e877d714b3c72ec12a3a7eda7f07eb045 (patch)
treede3f4b0263ffd926f8ef5fdeb0f31c858bc888ea /Library/Homebrew/cmd/versions.rb
parentc6b0b563e8a5b39c1e1a433446e00c28d15548df (diff)
downloadbrew-ad622a9e877d714b3c72ec12a3a7eda7f07eb045.tar.bz2
versions: unload constant before calling Formula.factory
Closes Homebrew/homebrew#18634. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew/cmd/versions.rb')
-rw-r--r--Library/Homebrew/cmd/versions.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/versions.rb b/Library/Homebrew/cmd/versions.rb
index 3d186bf72..ae8c321ad 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