The Billy Baldwin of Conditional Assignment

By Steve Richert

For those of you who don’t know, Billy Baldwin is the lesser-known and generally-less-useful little brother of famed actor Alec Baldwin.

In the world of Ruby’s conditional assignment operators, ||= is Alec Baldwin; charming and versatile. But not many people know about ||=’s little brother… the &&= operator.