From 44d367edca03acaa737a3156d05bf462f79f0fc3 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sat, 11 Mar 2017 11:31:44 +0100 Subject: Deprecate `#plural`. --- Library/Homebrew/utils/formatter.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'Library/Homebrew/utils') 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 -- cgit v1.2.3