I was looking at some ruby code I wrote a few days ago and something didn’t sit right with me. I had a bit of a code smell when setting a default value for a hash key if the key didn’t exist.The scenario… there is a hash that has a search key which holds information for a search term, optionally the order key may be set also.