Weird Ruby: Pure Object-Oriented Negation

1 · Bozhidar Batsov · May 5, 2019, 6:38 a.m.
I’m kicking off a new series of posts dedicated to some fun and weird aspects of our beloved Ruby programming language. I was torn apart between “Fun Ruby” and “Weird Ruby” for the name of the series, but I’ve opted for the latter for no real reason. Today we’re going to talk about object-oriented negation, which probably sounds rather weird, right? Let’s start with something familiar. In Ruby negation typically looks like this: !something.foo not something.bar Pretty straightforward stuff - yo...