aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula.rb
diff options
context:
space:
mode:
authorMax Howell2009-08-30 16:11:44 +0100
committerMax Howell2009-08-30 16:11:44 +0100
commit145e33abdf0670919d1e22540da694dbd91ed135 (patch)
tree0655d1aa270b3d1985bca910548e60caa3c02b60 /Library/Homebrew/formula.rb
parent11c67fe0b45c1f239d61e5d4ea40f22aeaea4a3f (diff)
downloadbrew-145e33abdf0670919d1e22540da694dbd91ed135.tar.bz2
Better cache names for accessory-formula
Because formula don't get named unless the brew kit instantiates them accessory formula were getting named "__UNKNOWN__". Which sucks. This isn't ideal for me as I made the naming use @name and @version to ensure unique naming. Now it is possible to have name clashes in the cache. So I need to solve it better at some point.
Diffstat (limited to 'Library/Homebrew/formula.rb')
-rw-r--r--Library/Homebrew/formula.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index a898944ee..2cff1fc36 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -254,8 +254,8 @@ private
end
def validate_variable name
- v=eval("@#{name}")
- raise "Invalid @#{name}" if v.nil? or v.empty? or v =~ /\s/
+ v=eval "@#{name}"
+ raise "Invalid @#{name}" if v.to_s.empty? or v =~ /\s/
end
def method_added method