Fun with Ruby Syntax
Smilies:
smilies = :-? /:-/ :-D
That’s nonsense code, smilies just gets /:-/ assigned. Fun nevertheless. Why that works? The first thing is a symbol literal, then there is a ternary operator, first result expression is a regular expression literal, the second is the negative version of the “D” constant. Because the symbol is true the second return expression is never evaluated and nobody complains about the missing constant D.