DEV Community

Discussion on: Level Up Your Ruby Skillz: Writing Compact Code

Collapse
enriquemorenotent profile image
Enrique Moreno Tent

The last expression would give a different result if x were to be false instead on nil. Beware.

Collapse
andrewbrown profile image
Andrew Brown 🇨🇦

This is why I didn't originally include it since someone such as yourself would have spotted this. ha