Code Golfing Leap Years in Ruby
A work buddy challenged me to a bit of Ruby code golfing.
Write a program to print all leap years from 1800 up to and including 2400.
The website he got the challenge from (https://code.golf/leap-years#ruby) has a neat feature: it can run your code and verify whether the output matches the expected result.
I’m usually not much of a code golfer, I generally prefer writing code that’s performant and readable rather than short and cryptic, but this turned out to be a fun little challenge and even somewhat educational.