method
compact
compact()
public
Returns a copy of self with all nil elements removed.
[ "a", nil, "b", nil, "c", nil ].compact #=> [ "a", "b", "c" ]
compact()
public
Returns a copy of self with all nil elements removed.
[ "a", nil, "b", nil, "c", nil ].compact #=> [ "a", "b", "c" ]