diff --git a/Library/.rubocop.yml b/Library/.rubocop.yml index 2aba282c45..be2fb4a67a 100644 --- a/Library/.rubocop.yml +++ b/Library/.rubocop.yml @@ -139,6 +139,9 @@ Style/RegexpLiteral: Style/SpaceAroundOperators: Enabled: false +Style/SingleLineBlockParams: + Enabled: false + # not a problem for typical shell users Style/SpecialGlobalVars: Enabled: false diff --git a/Library/Homebrew/cask/lib/hbc/utils.rb b/Library/Homebrew/cask/lib/hbc/utils.rb index 88b8a88c4b..ef3e5eda37 100644 --- a/Library/Homebrew/cask/lib/hbc/utils.rb +++ b/Library/Homebrew/cask/lib/hbc/utils.rb @@ -147,7 +147,7 @@ module Hbc end def self.size_in_bytes(files) - Array(files).reduce(0) { |a, e| a + (File.size?(e) || 0) } + Array(files).reduce(0) { |acc, elem| acc + (File.size?(elem) || 0) } end def self.capture_stderr diff --git a/Library/Homebrew/dev-cmd/boneyard-formula-pr.rb b/Library/Homebrew/dev-cmd/boneyard-formula-pr.rb index 487f0c9dbe..3d95f14b9f 100644 --- a/Library/Homebrew/dev-cmd/boneyard-formula-pr.rb +++ b/Library/Homebrew/dev-cmd/boneyard-formula-pr.rb @@ -62,7 +62,7 @@ module Homebrew end tap_migrations = Utils::JSON.load(File.read(tap_migrations_path)) tap_migrations[formula.name] = boneyard_tap.name - tap_migrations = tap_migrations.sort.inject({}) { |a, e| a.merge!(e[0] => e[1]) } + tap_migrations = tap_migrations.sort.inject({}) { |acc, elem| acc.merge!(elem[0] => elem[1]) } tap_migrations_path.atomic_write(JSON.pretty_generate(tap_migrations) + "\n") end unless which("hub") || local_only diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb index 0b32f64c7c..19148a6ae2 100644 --- a/Library/Homebrew/diagnostic.rb +++ b/Library/Homebrew/diagnostic.rb @@ -69,7 +69,7 @@ module Homebrew end def inject_file_list(list, string) - list.inject(string) { |a, e| a << " #{e}\n" } + list.inject(string) { |acc, elem| acc << " #{elem}\n" } end ############# END HELPERS