From: "Aaron D. Gifford" Date: 2011-03-26T21:33:59+09:00 Subject: Re: shortcut for add unless nil ? An alternative for the original poster's ENV variables potentially containing colon-separated paths: %w{FOO BAR BAZ}.map{|x| ENV[x].to_s}.join(':').split(/:+/) The .to_s should handle nil just fine. Concatenate all the strings, then do the split. Aaron out.