From: Robert Klemme Date: 2007-01-21T02:00:05+09:00 Subject: Re: conditional value in hash array ? On 20.01.2007 16:38, Josselin wrote: > my objective is not entering a value in the array if the domain is nil > so it seems I should enter first nil if domain is nil as you stated > then compact the array to get rid of nil values.. What exactly are you trying to achieve? Is it maybe rather something like this: hash = { :distance => radius.to_f, :valid_until => Time.now.utc } hash[ :category ]= domain unless domain.nil? Regards robert