In Groovy, there is a nice syntax for working with null values.
For example, I can do an if statement:
if (obj1?.obj2?.value) {
}
This will not throw a NullPointerException even if obj1 is null (it will evaluate to false).
This is something that's very convenient, so wondering if there is a Ruby equivalent I missed.
.?
operator. See bugs.ruby-lang.org/issues/… – Insomnia