From 3d27894015962a780dc3624ea6284eb303824bef Mon Sep 17 00:00:00 2001 From: Lionell Loh Jian An Date: Sun, 12 Jul 2020 11:12:10 +0800 Subject: [PATCH] Apply suggestions from code review Code review changes Co-authored-by: Mike McQuaid --- Library/Homebrew/formula.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 6cf72c71a8..f29013b75f 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -2208,13 +2208,15 @@ class Formula # @!attribute [w] # The SPDX ID of the open-source license that the formula uses. # Shows when running `brew info`. + # Multiple licenses means that the software is licensed under multiple licenses. + # Do not use multiple licenses if e.g. different parts are under different licenses. # #
license "BSD-2-Clause"
- def license args=nil - if args.blank? + def license(args = nil) + if args.nil? return @licenses else - @licenses = args.class == String ? [args] : args + @licenses = Array(args) puts @licenses # license. end