Kernel#Array returns an empty array when given nil. However, nil is retained when given an array containing nil. Unfortunately, this somehow surprising behavior is not documented.
Array(nil) # => []
Array([nil]) # => [nil]
Shall I open a PR to remedy this? :)
Kernel#Arrayreturns an empty array when givennil. However,nilis retained when given an array containingnil. Unfortunately, this somehow surprising behavior is not documented.Shall I open a PR to remedy this? :)