From: Rodrigo Rosenfeld Rosas Date: 2011-01-20T09:31:09+09:00 Subject: [ruby-core:34633] Re: Ruby operator equivalent to Groovy's "?." This is a multi-part message in MIME format. --------------090509070301040905040700 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Em 19-01-2011 22:27, Rodrigo Rosenfeld Rosas escreveu: > ...This is the same as: > > (obj == null ? null : (obj.somePropertyName == null ? null : > (obt.somePropertyName.anotherGreatPropertyName == null ? null : > obt.somePropertyName.anotherGreatPropertyName.anotherOne))) I meant "obj" instead of "obt", of course. For those who noticed, just ignore the typo... --------------090509070301040905040700 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Em 19-01-2011 22:27, Rodrigo Rosenfeld Rosas escreveu:
...This is the same as:

(obj == null ? null : (obj.somePropertyName == null ? null : (obt.somePropertyName.anotherGreatPropertyName == null ? null :
obt.somePropertyName.anotherGreatPropertyName.anotherOne)))
I meant "obj" instead of "obt", of course. For those who noticed, just ignore the typo...
--------------090509070301040905040700--