Merge pull request #8836 from MikeMcQuaid/options-nil-array
options: handle `nil` array.
This commit is contained in:
commit
7e240288fe
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user