From: Daniel DeLorme Date: 2008-04-01T15:28:49+09:00 Subject: Re: assignment if key_exist? in Hash darren kirby wrote: > quoth the Julian Leviston: >> What he's saying is if you want to retain the value of "false" or >> "nil", that won't work too well > > Ahh, OK. > > Not a prob. In my use case the hash key will be set to a string or it will not > exist. You could also use foo = hash.fetch("some_key", foo) -- Daniel