.reject(&:empty?) is a bit more compact, but you want to do .compact anyway if there's potential for nil values.