Use has_key? rather than accessing the value

This commit is contained in:
Jack Nagel 2013-06-13 18:40:08 -05:00
parent 020a505970
commit 4e4a5af731

View File

@ -306,7 +306,7 @@ module HomebrewEnvExtension
def replace_in_cflags before, after def replace_in_cflags before, after
CC_FLAG_VARS.each do |key| CC_FLAG_VARS.each do |key|
self[key] = self[key].sub before, after if self[key] self[key] = self[key].sub(before, after) if has_key?(key)
end end
end end