From dba1cfbec999a21181b2b83fbd21956a66a108d8 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 2 Oct 2020 13:48:26 +0100 Subject: [PATCH] options: handle `nil` array. Fixes #8835 --- Library/Homebrew/options.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/options.rb b/Library/Homebrew/options.rb index ff9edaa388..b486d3dc27 100644 --- a/Library/Homebrew/options.rb +++ b/Library/Homebrew/options.rb @@ -68,7 +68,7 @@ class Options include Enumerable def self.create(array) - new array.map { |e| Option.new(e[/^--([^=]+=?)(.+)?$/, 1] || e) } + new Array(array).map { |e| Option.new(e[/^--([^=]+=?)(.+)?$/, 1] || e) } end def initialize(*args)