On 11.12.2007 20:00, Andrew Stone wrote: > Note: parts of this message were removed by the gateway to make it a legal Usenet post. > >> def should_this_be_done? >> am_I_sure? && my_object.var && !my_object.var.nil? >> end >> >> > Ooops... meant > > def should_this_be_done? > am_I_sure? && my_object && !my_object.var.nil? > end > > Didn't mean to put add .var on the second test. Well, you could do am_I_sure? && my_object && my_object.var It's not exactly the same but if you don't care whether my_object.var is nil or false or if you know that it never will be false then it's ok. Kind regards robert