Don't send, just call the method directly

This commit is contained in:
Jack Nagel 2013-12-27 16:19:43 -06:00
parent e29cbc5a48
commit c95b90a022
2 changed files with 2 additions and 2 deletions

View File

@ -204,7 +204,7 @@ module Homebrew extend self
f = Formula.factory formula_name f = Formula.factory formula_name
formula_relative_path = "Library/Formula/#{f.name}.rb" formula_relative_path = "Library/Formula/#{f.name}.rb"
formula_path = HOMEBREW_REPOSITORY+formula_relative_path formula_path = HOMEBREW_REPOSITORY+formula_relative_path
has_bottle_block = f.class.send(:bottle).checksums.any? has_bottle_block = f.class.bottle.checksums.any?
inreplace formula_path do |s| inreplace formula_path do |s|
if has_bottle_block if has_bottle_block
s.sub!(/ bottle do.+?end\n/m, output) s.sub!(/ bottle do.+?end\n/m, output)

View File

@ -45,7 +45,7 @@ class Formula
map = Hash.new { |h, k| h[k] = [] } map = Hash.new { |h, k| h[k] = [] }
rev_list(branch) do |rev| rev_list(branch) do |rev|
formula_for_sha(rev) do |f| formula_for_sha(rev) do |f|
bottle = f.class.send(:bottle) bottle = f.class.bottle
unless bottle.checksums.empty? unless bottle.checksums.empty?
map[bottle.version] << bottle.revision map[bottle.version] << bottle.revision
end end