From: Gavin Sinclair Date: 2002-11-27T07:59:47+09:00 Subject: Re: Default value of property From: > [batsman:] > > What's wrong about '? :' ? > > > > irb(main):001:0> b = nil > > nil > > irb(main):002:0> (__f=b)?__f.meth : nil > > Or: > > b.meth if b > > (if I'm understanding this part of the discussion correctly...) Your code is equivalent to batsman's, but the OP wanted a default value thrown in, so: b and b.meth or default_value The original and the best! > David Gavin