aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils
diff options
context:
space:
mode:
authorMarkus Reiter2017-03-11 11:31:44 +0100
committerMarkus Reiter2017-03-11 21:16:37 +0100
commit44d367edca03acaa737a3156d05bf462f79f0fc3 (patch)
tree0c6716cdd000e2f45f823450faecf798db957426 /Library/Homebrew/utils
parent00306a4ced339f9bf2384a4fd94b26530995dd6c (diff)
downloadbrew-44d367edca03acaa737a3156d05bf462f79f0fc3.tar.bz2
Deprecate `#plural`.
Diffstat (limited to 'Library/Homebrew/utils')
-rw-r--r--Library/Homebrew/utils/formatter.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/Library/Homebrew/utils/formatter.rb b/Library/Homebrew/utils/formatter.rb
index 88616c6f8..099b1c6d3 100644
--- a/Library/Homebrew/utils/formatter.rb
+++ b/Library/Homebrew/utils/formatter.rb
@@ -96,11 +96,9 @@ module Formatter
*adjectives, noun = singular.split(" ")
- if plural.nil?
- plural = {
- "formula" => "formulae",
- }.fetch(noun, "#{noun}s")
- end
+ plural ||= {
+ "formula" => "formulae",
+ }.fetch(noun, "#{noun}s")
words = adjectives << plural