4 ms·
Not perfect, but ruby 2.3 introduces the safe navigation operator (&.), so you can do foo&.each or foo&.bar
by wes-k 8y ago
Not perfect, but ruby 2.3 introduces the safe navigation operator (&.), so you can do foo&.each or foo&.bar
- kwillets 8y agoI'm at best an intermediate-level rubyist, but I was quite surprised when more experienced people didn't recognize that operator after I started using it. It seems like one of the most significant upgrades. I got really into it and started using it with operators, eg num_objects&.> 0
- ezekg 8y agoI didn't even think of using it with operators. Awesome.