aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Library/Homebrew/formula.rb2
-rwxr-xr-xbin/brew3
2 files changed, 2 insertions, 3 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index e394d0f5c..dd4e03261 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -378,7 +378,7 @@ class Formula
begin
klass_name = self.class_s(name)
- klass = eval(klass_name)
+ klass = Object.const_get klass_name
rescue NameError
# TODO really this text should be encoded into the exception
# and only shown if the UI deems it correct to show it
diff --git a/bin/brew b/bin/brew
index c06a673dc..5fe19cc89 100755
--- a/bin/brew
+++ b/bin/brew
@@ -71,10 +71,9 @@ begin
# Add example external commands to PATH before checking.
ENV['PATH'] += ":#{HOMEBREW_REPOSITORY}/Library/Contributions/examples"
-
if system "/usr/bin/which -s brew-#{cmd}"
%w[CACHE CELLAR LIBRARY_PATH PREFIX REPOSITORY].each do |e|
- ENV["HOMEBREW_#{e}"] = eval "HOMEBREW_#{e}"
+ ENV["HOMEBREW_#{e}"] = Object.const_get "HOMEBREW_#{e}"
end
exec "brew-#{cmd}", *ARGV
elsif require? `/usr/bin/which brew-#{cmd}.rb`