On 03.03.2008 11:20, Thomas Wieczorek wrote: > On Mon, Mar 3, 2008 at 10:38 AM, Robert Klemme > <shortcutter / googlemail.com> wrote: >> we had frequent discussions about how to make code safely deal with >> possible nil values. I remember having seen various solutions >> proposed. However, I cannot remember having seen this, which just >> occurred to me: > > Raganwald proposed Object#andand and Object#me > http://weblog.raganwald.com/2008/01/objectandand-objectme-in-ruby.html > > He also discusses Object#if_not_nil > http://weblog.raganwald.com/2008/02/ifnotnil.html > which was proposed by FraníĐis Beausoleil at > http://blog.teksol.info/2007/11/23/a-little-smalltalk-in-ruby-if_nil-and-if_not_nil Ah, good point! Thanks for the links. I guess that solution is just too obvious - I just could not remember having seen it. I have to take my Voltax... ;-) Kind regards robert