diff options
| author | Martin Afanasjew | 2016-07-08 01:14:34 +0200 | 
|---|---|---|
| committer | GitHub | 2016-07-08 01:14:34 +0200 | 
| commit | bf40dd64dff1fc86b0ecbde33dc9e3be3ef3fccb (patch) | |
| tree | f179c96a8cdc428671db3969904be3802cd9a650 /Library/Homebrew/tab.rb | |
| parent | 86b1df96b9a439c9a31556c0e9fd6c297e4f6646 (diff) | |
| download | brew-bf40dd64dff1fc86b0ecbde33dc9e3be3ef3fccb.tar.bz2 | |
tab: eliminate redundant 'Tab.create' arguments (#468)
The `build` and `source_modified_time` arguments are always coming from
the matching attributes of the `Formula` instance. Thus query `formula`
for them instead of passing them individually.
Diffstat (limited to 'Library/Homebrew/tab.rb')
| -rw-r--r-- | Library/Homebrew/tab.rb | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/Homebrew/tab.rb b/Library/Homebrew/tab.rb index a407496bb..58eee9478 100644 --- a/Library/Homebrew/tab.rb +++ b/Library/Homebrew/tab.rb @@ -15,7 +15,8 @@ class Tab < OpenStruct      CACHE.clear    end -  def self.create(formula, compiler, stdlib, build, source_modified_time) +  def self.create(formula, compiler, stdlib) +    build = formula.build      attributes = {        "used_options" => build.used_options.as_flags,        "unused_options" => build.unused_options.as_flags, @@ -23,7 +24,7 @@ class Tab < OpenStruct        "built_as_bottle" => build.bottle?,        "poured_from_bottle" => false,        "time" => Time.now.to_i, -      "source_modified_time" => source_modified_time.to_i, +      "source_modified_time" => formula.source_modified_time.to_i,        "HEAD" => HOMEBREW_REPOSITORY.git_head,        "compiler" => compiler,        "stdlib" => stdlib,  | 
