From: Gavri Fernandez Date: 2005-02-14T01:25:14+09:00 Subject: "Joining" strings which may be nil (or) Handling Option hashes Hi everyone, I want to create a query based on options passed in through an options hash to my method. The query would look like "title:ruby and author:dave and publisher:oreilly" or "title:ruby and publisher:addison-wesley" or "author:dave" or some other combination based on what options have been set in the hash. options[:author] |= "" followed by Array#join doesn't help me because it would lead to successive 'and's in the query. What is the Ruby Idiom to achieve what I want? TIA -- Gavri --------------------------------------------------- I blog here: http://gavri.blogspot.com