Why do you want to add nil? It is specifically designed to be something that represents a lack of meaning (note: nilNOT 0).
If what you really want to do is set both values to 0, if at the moment it is nil, then you really want to:
if a.nil? or b.nil?; a,b=0,0; end
a,b=0, a 0 - b nil, , ( nil).