Ruby Short Circuit (||=) edge case - response
On DABlog.com there is an article on Ruby Short Circuit evaluation. It’s an interesting read, although it comes to a slightly incorrect conclusion.
The questions is what does the statement x ||= 1 expand to. The initial hypothesis was that it expands to x = x || 1. That struck me as odd […]