From: Adam Sanderson Date: 2005-10-20T01:51:58+09:00 Subject: Re: The Ruby Way to build an object unless nil? Not quite a direct response, but the ||= idiom is also handy for these things ie: irb(main):001:0> a = nil irb(main):002:0> b = 4 irb(main):003:0> b ||= 7 => 4 irb(main):004:0> b => 4 irb(main):005:0> a ||= b => 4 irb(main):006:0> a => 4 .adam