Ruby Null-Conditional operator

Viewed 1990

C# has a null-conditional operator that works like this

SomeObject?.SomeParam

If SomeObject is null, then the result of that expression will be null rather than throwing a null reference exception. Does something like this exist in Ruby?

2 Answers
Related