Here's a recent typo that had interestingly important effects:
Meant to write
if line =~ /some-reg-expression/
Actually wrote:
if line = ~/some-reg-expression/
Result: found nothing!
FYI, the type of ~/some-reg-expression/ is NilClass